You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,6 @@ update:
6
6
generate:
7
7
go list -f '{{.Dir}}/...' -m | xargs go generate
8
8
lint:
9
-
go list -f '{{.Dir}}/...' -m | xargs go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -v --fix -c .golangci.yaml
9
+
go list -f '{{.Dir}}/...' -m | xargs go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -j 4 --allow-parallel-runner -v --fix -c .golangci.yaml
10
10
structalign:
11
11
go list -f '{{.Dir}}' -m | xargs -I {} sh -c 'cd {} && go run golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment -fix ./...'
Backline is a minimalistic Internal Developer Portal (IDP) inspired by Backstage, built using Go and HTMX. It provides a flexible and extensible platform for exploring various developer resources.
@@ -39,131 +30,102 @@ Some features may be disabled (for example "Scan" button)
39
30
-**Lower learning curve**: Backline is designed to be easier to learn and use.
40
31
-**Simpler upgrades**: Unlike Backstage, which requires scaffolding and is hard to upgrade, Backline isn't scaffolded and should work just by updating go.mod.
41
32
-**Easy plugin development**:
42
-
- Plugins register themselves and do not require any code modifications.
33
+
- Plugins register themselves and do not require any code modifications (for now you need to include them into your main file as dependency. Later should be possible to just drop them as *.so files into plugins folder).
43
34
- Plugins implement statically typed interfaces, making them easy to implement and detect version incompatibilities.
44
35
-**Addressing Backstage issues**:
36
+
- Backstage does not support search on openapi and asyncapi specs (closed as not planned [backstage/backstage#22802](https://github.com/backstage/backstage/issues/22802)).
45
37
- Backstage does not respect some relations like `apiProvidedBy` out of the box [backstage/backstage#25387](https://github.com/backstage/backstage/issues/25387).
46
38
- Plugins use different HTTP clients that may not respect proxy settings [help-im-behind-a-corporate-proxy](https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/help-im-behind-a-corporate-proxy.md).
47
39
48
40
## Getting Started
49
41
50
-
To get started with Backline with default plugins, run:
42
+
To get started with Backline you need to add as least few plugins or specify implementations for core functionality
51
43
52
-
```bash
53
-
go run github.com/iamgoroot/backline/cmd/backline --config {your-config-location}/config.yaml
54
-
```
44
+
Let's start with a simple example of running just catalog and scanner with minimalistic set of plugins
45
+
We will use the following plugins/features:
55
46
56
-
This will run Backline with default plugins. You can also run it within your own application as a library:
47
+
* Discovery for entities on file system
48
+
* PostgreSQL plugin for storage (both entity and as Key-Value)
49
+
* PostgreSQL plugin for distributed lock (using pg_try_advisory_xact_lock)
50
+
* Default plugin for scheduler (this is only option for now)
51
+
* Default theme (with dark and light modes depending on OS theme)
57
52
58
53
```golang
59
-
application:= app.App{
60
-
// run catalog and scanner
61
-
PluggableDeps: app.PluggableDeps{
62
-
EntityDiscoveries: []core.Discovery{ // Add Location Readers so Backline knows how to read entities from different sources
63
-
&fs.Discovery{}, &github.Discovery{},
64
-
},
65
-
EntityRepo: &store.Repo{}, // set repository plugin configurable with config file. supports pg and sqlite
66
-
KeyValStore: &store.KV{}, //set key-value storage plugin configurable with config file. supports pg and sqlite
67
-
JobScheduler: &store.Scheduler{}, // set job scheduler plugin configurable with config file. supports pg and sqlite
68
-
DistributedLocker: &store.Locker{}, // set distributed lock plugin configurable with config file. supports pg and sqlite
69
-
},
70
-
Plugins: []core.Plugin{
71
-
catalog.Plugin{}, // add web interface for catalog
72
-
oauth2.Plugin{}, // add oauth2 plugin for catalog authentication
go run github.com/iamgoroot/backline/cmd/webapp --config {your-config-location}/config.yaml
115
-
```
116
-
117
-
Or run catalog UI as a library in an existing service:
118
-
119
-
```golang
120
-
application:= app.App{
121
-
Plugins: []app.Plugin{
122
-
catalog.Plugin{},
123
-
stock.Theme{},
124
-
},
125
-
}
126
-
127
-
err:= application.Run()
123
+
go run main.go --config {your-config-location}/config.yaml
128
124
```
129
125
130
-
This will start Backline with no plugins except the default UI theme and catalog plugin. No OAuth2, no scanner, no OpenAPI explorer, no discovery.
126
+
Open [http://localhost:8080](http://localhost:8080) and you should see the catalog UI. Click on `Scan entities` button to start scanning entities in directory `./entities`
131
127
132
-
## Configuration
133
-
134
-
### Basics
135
-
136
-
Backline uses a YAML config file to configure itself. The config file allows you to specify default values and environment variable overrides.
137
-
138
-
```yaml
139
-
key: value1
140
-
key_from_env: env:ENV_VAR_NAME
141
-
key_with_default: env:ENV_VAR_NAME|default_value
142
-
```
143
-
144
-
In the example above, `key` will be set to `value1`, `key_from_env` will be set to the value of the environment variable `ENV_VAR_NAME`, and `key_with_default` will be set to the value of the environment variable `ENV_VAR_NAME` or `default_value` if the environment variable is not set.
145
-
146
-
### Core Config
147
-
148
-
Here's an example of a minimalistic core config:
149
-
150
-
```yaml
151
-
core:
152
-
server: # configure server ports, host, origins etc
153
-
port: env:PORT|8080
154
-
host: localhost
155
-
origins:
156
-
- http://localhost:8080
157
-
logger: # configure logging level and format
158
-
level: env:LOG_LEVEL|DEBUG
159
-
format: json
160
-
repo: # configure repository implementation
161
-
sqlite:
162
-
url: ":memory:" # use in-memory SQLite database for the simplest setup
0 commit comments