Signup and account management app for Kosmos/LDAP Accounts https://accounts.kosmos.org
Go to file
Râu Cao 6739b38f4c
continuous-integration/drone/push Build is passing Details
0.8.0
2023-09-01 12:18:26 +02:00
.gitea Count up minor version on feature merge 2023-07-13 15:26:35 +02:00
app Fix copypasta 2023-09-01 10:32:11 +02:00
bin Support vendoring npm module code 2023-06-16 13:51:09 +02:00
config Upgrade tailwindcss-stimulus-components to latest version 2023-08-11 13:58:57 +02:00
db Merge branch 'master' into feature/rs-oauth 2023-06-20 14:07:46 +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 Allow Mastodon address domain to be different from primary domain 2023-08-13 12:27:05 +02: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 Add separate config for RS Redis 2023-07-14 15:27:30 +02:00
.env.example Make Drone CI configurable 2023-08-13 17:23:57 +02:00
.env.test Add separate config for RS Redis 2023-07-14 15:27:30 +02:00
.gitignore Ignore .env.development 2023-08-13 12:26:56 +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 copy files as list 2023-06-23 17:21:17 +02:00
Gemfile Add RS OAuth controller specs 2023-08-01 14:29:24 +02:00
Gemfile.lock Add RS OAuth controller specs 2023-08-01 14:29:24 +02:00
LICENSE Add AGPL license 2020-11-18 15:32:27 +01:00
Procfile.dev Add Docker Compose config and 389ds service 2022-12-02 19:21:13 +01:00
README.md 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
config.ru 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.0 2023-09-01 12:18:26 +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

README.md

Build Status

Akkounts

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

Development

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:

bin/dev

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

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

Documentation

Rails

Front-end

Testing

LDAP / Auth

Asynchronous jobs/workers

Feature Flags

License

GNU Affero General Public License v3.0