Skip to content

suitenumerique/accounts

Accounts

License: MIT Django Next JS

Not ready for production yet 🚧

Accounts is currently in early development.

  • Separate User and Identity models to support multiple authentication methods per user
  • Add base frontend
  • Add user attribute to store authentication method (only OIDC for now)
  • Add user authentication origin in the user information (token + userinfo endpoint) or better: the trust authentication level
  • Add external user management (locally created users with invitation)
  • Add requirements for external users (OTP, TOTP, ...)

Getting started πŸ”§

Run Accounts locally

⚠️ The methods described below for running Accounts locally is for testing purposes only.

Prerequisite

Make sure you have a recent version of Docker and Docker Compose installed on your laptop, then type:

$ docker -v

Docker version 20.10.2, build 2291f61

$ docker compose version

Docker Compose version v2.32.4

⚠️ You may need to run the following commands with sudo, but this can be avoided by adding your user to the local docker group.

Project bootstrap

The easiest way to start working on the project is to use GNU Make:

$ make bootstrap FLUSH_ARGS='--no-input'

This command builds the app-dev and frontend-dev containers, installs dependencies, performs database migrations and compiles translations. It's a good idea to use this command each time you are pulling code from the project repository to avoid dependency-related or migration-related issues.

Your Docker services should now be up and running πŸŽ‰

You can access the project by going to http://localhost:9900.

You will be prompted to log in. The default credentials are:

username: accounts
password: accounts

πŸ“ Note that if you need to run them afterwards, you can use the eponymous Make rule:

$ make run

⚠️ For the frontend developer, it is often better to run the frontend in development mode locally.

To do so, install the frontend dependencies with the following command:

$ make frontend-development-install

And run the frontend locally in development mode with the following command:

$ make run-frontend-development

To start all the services, except the frontend container, you can use the following command:

$ make run-backend

To execute frontend tests & linting only

$ make frontend-test
$ make frontend-lint

Adding content

You can create a basic demo site by running this command:

$ make demo

Finally, you can check all available Make rules using this command:

$ make help

Django admin

You can access the Django admin site at:

http://localhost:9901/admin.

You first need to create a superuser account:

$ make superuser

Development Services

When running the project, the following services are available:

Service URL / Port Description Credentials
Frontend http://localhost:9900 Main Messages frontend None yet
Backend API http://localhost:9901 Django admin@example.com / admin
Keycloak http://localhost:9902 Identity provider admin admin / admin
Nginx http://localhost:9903 Nginx No auth required
Mailcatcher http://localhost:9904 Email testing interface No auth required
PostgreSQL 9912 Database server dinum / pass
Redis 9913 Cache and message broker No auth required
MinIO 9905 and http://localhost:9906 Local S3 storage No auth required

License πŸ“

This work is released under the MIT License (see LICENSE).

While Accounts is a public-driven initiative, our license choice is an invitation for private sector actors to use, sell and contribute to the project.

Contributing πŸ™Œ

You can help us with translations on Crowdin.

If you intend to make pull requests, see CONTRIBUTING for guidelines.

Directory structure:

docs
β”œβ”€β”€ bin - executable scripts or binaries that are used for various tasks, such as setup scripts, utility scripts, or custom commands.
β”œβ”€β”€ crowdin - for crowdin translations, a tool or service that helps manage translations for the project.
β”œβ”€β”€ docker - Dockerfiles and related configuration files used to build Docker images for the project. These images can be used for development, testing, or production environments.
β”œβ”€β”€ docs - documentation for the project, including user guides, API documentation, and other helpful resources.
β”œβ”€β”€ env.d/development - environment-specific configuration files for the development environment. These files might include environment variables, configuration settings, or other setup files needed for development.
β”œβ”€β”€ gitlint - configuration files for `gitlint`, a tool that enforces commit message guidelines to ensure consistency and quality in commit messages.
β”œβ”€β”€ playground - experimental or temporary code, where developers can test new features or ideas without affecting the main codebase.
└── src - main source code directory, containing the core application code, libraries, and modules of the project.

Credits ❀️

Stack

Accounts is built on top of:

We thank the contributors of these projects for their awesome work!

Gov ❀️ open source

About

LaSuite user accounts management

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors