Signup and account management app for Kosmos/LDAP Accounts https://accounts.kosmos.org
Go to file
Râu Cao 1c54e4c0b5
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
New CI image Dockerfile
2024-02-03 11:36:06 +02:00
.gitea Count up minor version on feature merge 2023-07-13 15:26:35 +02:00
app Use keyword arguments for ApplicationService calls 2024-02-02 15:50:25 +02:00
bin Support vendoring npm module code 2023-06-16 13:51:09 +02:00
ci New CI image Dockerfile 2024-02-03 11:36:06 +02:00
config Update dependencies, upgrade to Rails 7.1, require Ruby 3.x 2024-02-02 14:25:47 +02:00
db Associate RS authorizations with web apps 2023-10-24 17:29:24 +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 email service and settings 2024-01-10 18:30:05 +03:00
spec Fix deprecation warning 2024-02-02 16:58:04 +02:00
tmp Remove pid dir from git 2022-12-07 18:14:49 +01:00
vendor Update nostr gem, switch to Ruby for bech32 encoding 2024-01-15 12:54:58 +03:00
.browserslistrc Hello kosmos. 2020-11-07 14:49:52 +01:00
.drone.yml Use new CI image with Ruby 3.3.0 2024-02-02 17:28:33 +02:00
.env.example Use full URL for S3 alias host 2024-02-02 14:01:47 +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 Update dependencies, upgrade to Rails 7.1, require Ruby 3.x 2024-02-02 14:25:47 +02:00
Dockerfile Update Ruby for Dockerfile/Compose 2024-02-02 14:34:09 +02:00
Gemfile Switch to newly published manifique gem 2024-02-02 17:55:20 +02:00
Gemfile.lock Switch to newly published manifique gem 2024-02-02 17:55:20 +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 Add info for running Minio/RS to README 2023-11-01 22:01:14 +01: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 Finish working liquor-cabinet setup for Docker Compose 2023-11-16 12:46:19 +01: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

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.

Minio / RS

If you want to run remoteStorage accounts locally, you will have to create the respective bucket first:

  • docker compose up web redis minio liquor-cabinet
  • Head to http://localhost:9001 and log in with user minioadmin, password minioadmin
  • Create a new bucket called remotestorage (or whatever you change the S3_BUCKET config to)
  • Create a new key with ID "dev-key" and secret "123456789" (or whatever you change S3_ACCESS_KEY and S3_SECRET_KEY to). Leave the policy field empty, as it will automatically allow access to the bucket you created.

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