/base-users

Basic code for an application requiring user authentication and dashboard administration

Primary LanguageTypeScriptMIT LicenseMIT

Base users

Base users is a project comprising the basics of a web application with user management (authentication, administration dashboard, settings) using AdonisJS with Inertia and React. It's a base that can be reused to create other web applications. This application uses server-side rendering.


TypeScript Adonis Intertia

React Tailwindcss Shadcnui

GitHub License

Table Of Content

To install this project, you will need to have on your machine :

Node Postgres

Note: Node.js >= 20.6 is required!

Info: For PostgreSQL , you can use the current docker-compose file

# Install dependencies
npm install

Environnement files need to be like env.ts on start/env.ts .

You need to create a .env file in this directory.

Environment variables are :

Name Description exemple value
TZ Time zone for dates UTC
PORT Port on which app will be run 3333
HOST Host on which app will be run localhost
LOG_LEVEL Log level info
APP_KEY App key used by adonis x
DB_HOST Database host 127.0.0.1
DB_PORT Database port 5432
DB_USER Database user postgres
DB_PASSWORD Database password random_password
DB_DATABASE Database name base_users
GOOGLE_CLIENT_ID Client id for google auth x
GOOGLE_CLIENT_SECRET Client secret for google auth x
GOOGLE_CALLBACK_URL Callback url for google auth http://localhost:3333/google/callback
DEFAULT_USER_ADMIN default email to be admin email@email.com
RESEND_API_KEY Resend API key for emailing x
RESEND_FROM Resend email from x
H_CAPTCHA_SECRET_KEY HCaptcha secret key x
H_CAPTCHA_SITE_KEY HCaptcha site key x
CALLBACK_VERIFY_EMAIL_URL Callback url for verify email http://localhost:3333/callback/verifyEmail
CALLBACK_RESET_PASSWORD_URL Callback url for reset password http://localhost:3333/callback/resetPassword
# Optionnal - Run dabatase with docker
docker-compose up -d

# Run the server
npm run dev

Then, go to localhost:3333

  • Typescript : To improve the quality and robustness of your JavaScript code with types.
  • Adonis : To create a fullstack Typescript application with a pleasant development experience
  • Inertia : To use React and simplify interaction with the server
  • React : Mastery of the framework, desire to use it with adonis
  • Tailwind CSS : Framework for rapid application styling
  • Shadcn/ui : Test the library with React and TailwindCSS. Make your components usable, easily customizable and accessible.

This project is licensed under the MIT License.