Signup and account management app for Kosmos/LDAP Accounts
Go to file
Râu Cao e301ac8e2e
continuous-integration/drone/push Build is passing Details
Fix title
2023-11-01 22:47:59 +01:00
.gitea Count up minor version on feature merge 2023-07-13 15:26:35 +02:00
app Fix title 2023-11-01 22:47:59 +01:00
bin Support vendoring npm module code 2023-06-16 13:51:09 +02:00
ci Use custom docker image with libvips installed in CI 2023-09-07 19:40:43 +02:00
config Merge branch 'master' into feature/btcpay_configs 2023-09-20 19:12:24 +02:00
db Add/configure ActiveStorage 2023-09-06 12:14:28 +02:00
lib Add support and migration for lndhub.go 2022-12-22 20:01:14 +07:00
log Hello kosmos. 2020-11-07 14:49:52 +01:00
public Add Mastodon service page 2023-08-11 13:58:53 +02:00
spec Merge pull request 'Fix XMPP from-address config not being used' (#150) from bugfix/xmpp_from_address into master 2023-10-19 10:47:45 +00:00
tmp Remove pid dir from git 2022-12-07 18:14:49 +01:00
vendor Upgrade tailwindcss-stimulus-components to latest version 2023-08-11 13:58:57 +02:00
.browserslistrc Hello kosmos. 2020-11-07 14:49:52 +01:00
.drone.yml Use custom docker image with libvips installed in CI 2023-09-07 19:40:43 +02:00
.env.example Add configurable settings for BTCPay 2023-09-04 15:23:27 +02:00
.env.test Refactor BTCPay service and API, add lightning balance 2023-09-04 16:02:54 +02:00
.gitignore Add/configure ActiveStorage 2023-09-06 12:14:28 +02:00
.rspec Hello kosmos. 2020-11-07 14:49:52 +01:00
.ruby-version Upgrade to Rails 7, new JS build setup 2022-02-12 13:55:56 -06:00
Dockerfile Add libvips package to Docker container 2023-09-07 11:42:24 +02:00
Gemfile Add/configure ActiveStorage 2023-09-06 12:14:28 +02:00
Gemfile.lock Add/configure ActiveStorage 2023-09-06 12:14:28 +02:00
LICENSE Add AGPL license 2020-11-18 15:32:27 +01:00 Add Docker Compose config and 389ds service 2022-12-02 19:21:13 +01:00 Update README 2023-08-07 18:16:34 +02:00
Rakefile Hello kosmos. 2020-11-07 14:49:52 +01:00
babel.config.js Hello kosmos. 2020-11-07 14:49:52 +01:00 Hello kosmos. 2020-11-07 14:49:52 +01:00
docker-compose.yml Add separate config for RS Redis 2023-07-14 15:27:30 +02:00
package.json 0.8.1 2023-09-03 15:35:46 +02:00
postcss.config.js Switch from Webpacker to cssbundling-rails, upgrade Tailwind 2022-02-11 17:23:31 -06:00
tailwind.config.js Add QR code icon, button, modal for invites 2023-06-27 19:23:20 +02:00
yarn.lock Settings page for adding verified nostr pubkeys 2023-06-16 14:22:30 +02:00

Build Status


This app allows Kosmos/LDAP users to manage their accounts, including credentials, invites, donations, etc..


Quick Start

The easiest way to get a working development setup is using Docker Compose like so:

  1. Make sure Docker Compose is installed and Docker is running (included in Docker Desktop)
  2. Run docker compose up and wait until 389ds announces its successful start in the log output
  3. docker-compose exec ldap dsconf localhost backend create --suffix="dc=kosmos,dc=org" --be-name="dev"
  4. docker compose run web rails ldap:setup
  5. docker compose run web rails db:setup

After these steps, you should have a working Rails app with a handful of test users running on http://localhost:3000. Log in with username "admin" and password "admin is admin". All users listed on http://localhost:3000/admin/users have the password "user is user".

Rails app

Installing dependencies:

bundle install
yarn install

Setting up local database (SQLite):

bundle exec rails db:create
bundle exec rails db:migrate

Running the dev server and auto-building CSS files on change:


Running the background workers (requires Redis):

bundle exec sidekiq -C config/sidekiq.yml

Running all specs:

bundle exec rspec

Docker (Compose)

There is a working Docker Compose config file, which define a number of services including an app server for Rails as well as a local 389ds (LDAP) server.

For Rails developers, you probably just want to start the LDAP server: docker-compose up ldap, listening on port 389 on your machine.

You can pick and choose your services adding them by name (listed in docker-compose.yml) at the end of the docker compose command. eg. docker compose up ldap redis

LDAP server

After creating the Docker container for the first time (or after deleting it), you need to run the following command once, in order to create the dirsrv back-end:

docker-compose exec ldap dsconf localhost backend create --suffix="dc=kosmos,dc=org" --be-name="dev"

Now you can seed the back-end with data using this Rails task:

bundle exec rails ldap:setup

The setup task will first delete any existing entries in the directory tree ("dc=kosmos,dc=org"), and then create our development entries.

Note that all 389ds data is stored in tmp/389ds. So if you want to start over with a fresh installation, delete both that directory as well as the container.

Adding npm modules to use with Stimulus controllers

The following command downloads the specified npm module to vendor/javascript and adds an entry for it to config/importmap.rb.

bin/importmap pin bech32 --download


Solargraph is a Ruby language server, which you may use with your editor to add features like auto-completion and syntax validation. You can add inline documentation for bundled gems with this command:

bundle exec yard gems





LDAP / Auth

Asynchronous jobs/workers

Feature Flags


GNU Affero General Public License v3.0