Signup and account management app for Kosmos/LDAP Accounts https://accounts.kosmos.org
Go to file
Râu Cao 4a045bf61c
continuous-integration/drone/push Build is passing Details
Merge pull request 'Various front-end improvements and bugfixes' (#78) from feature/frontend_improvements into master
Reviewed-on: #78
Reviewed-by: galfert <garret.alfert@gmail.com>
Reviewed-by: bumi <bumi@noreply.kosmos.org>
2023-01-25 04:16:55 +00:00
app Merge pull request 'Various front-end improvements and bugfixes' (#78) from feature/frontend_improvements into master 2023-01-25 04:16:55 +00:00
bin Add rspec binstub 2022-02-12 15:09:56 -06:00
config Merge pull request 'Various front-end improvements and bugfixes' (#78) from feature/frontend_improvements into master 2023-01-25 04:16:55 +00:00
db Add migration for unencrypted ln login field 2023-01-11 19:50:01 +08:00
docker Add Dockerfile for development 2022-12-02 19:19:02 +01: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 empty state for wallet transactions view 2023-01-12 16:21:40 +08:00
spec Add specs for lndhub webhook 2023-01-12 14:33:31 +08:00
tmp Remove pid dir from git 2022-12-07 18:14:49 +01:00
vendor Hello kosmos. 2020-11-07 14:49:52 +01:00
.browserslistrc Hello kosmos. 2020-11-07 14:49:52 +01:00
.drone.yml Update Docker image in CI 2022-12-06 10:19:47 +01:00
.env.example WIP Add Webhooks controller, allowed IP config 2023-01-11 19:17:27 +08:00
.env.production WIP Add Webhooks controller, allowed IP config 2023-01-11 19:17:27 +08:00
.env.test WIP Add Webhooks controller, allowed IP config 2023-01-11 19:17:27 +08:00
.gitignore Switch from Webpacker to cssbundling-rails, upgrade Tailwind 2022-02-11 17:23:31 -06: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 Fix web container start when offline 2023-01-10 14:13:24 +08:00
Gemfile Add db/user seeds 2022-12-07 18:12:54 +01:00
Gemfile.lock Add db/user seeds 2022-12-07 18:12:54 +01: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 Improve README, add quick start instructions 2022-12-07 18:15:04 +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 Don't start phpldapadmin by default 2022-12-07 18:11:23 +01:00
package.json Update dependencies 2022-12-02 19:16:56 +01:00
postcss.config.js Switch from Webpacker to cssbundling-rails, upgrade Tailwind 2022-02-11 17:23:31 -06:00
tailwind.config.js Improve notifications, fix styles not being added 2022-02-21 11:03:43 -06:00
yarn.lock Update dependencies 2022-12-02 19:16:56 +01: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. Uncomment the web section in docker-compose.yml
  3. Run docker compose up and wait until 389ds announces its successful start in the log output
  4. docker-compose exec ldap dsconf localhost backend create --suffix="dc=kosmos,dc=org" --be-name="dev"
  5. docker compose run web rails ldap:setup
  6. 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/ldap_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 allows you to spin up both an app server for Rails as well as a local 389ds (LDAP) server.

By default, docker-compose up will only start the LDAP server, listening on port 389 on your machine. Uncomment other services in docker-compose.yml if you want to use them.

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.

Documentation

Front-end

Testing

LDAP / Auth

Asynchronous jobs/workers

License

GNU Affero General Public License v3.0