This is boilerplate project for SAAS. Originally created for https://docion.com - corporate wiki with advanced versioning system.
- uWebsocket.js server (NodeJS)
- Postgres database (via Sequelize, can be easily replaced with anything else)
- Angular 21 client (with Tailwind)
- Email/Google auth (both passwordless) with JWT
- Spaces/Organisations with basic user management
- Projects/Folders for your entities
- Basic ui components (no dependencies)
- Angular and NodeJS knowledge
- NodeJS
- Postgres
- Email gateway for self-registration or GOOGLE_CLIENT_ID for google auth
- Angular CLI
- Clone/download project
- Create .env file in ./server
# General
EMAIL_TYPE="SMTP"#options: SMTP, CONSOLE
DB_TYPE="LOCAL"#options: LOCAL
HTTP_PORT="5001"
CLIENT_URL="http://localhost:4200"
API_URL="http://localhost:5001/api"
# SMTP
SMTP_HOST="smtp.googlemail.com"
SMTP_PORT=587
SMTP_USER="user"
SMTP_PASSWORD="password"
# Local database
DB_HOST="localhost"
DB_PORT=5432
DB_NAME="DB_NAME"
DB_USER="DB_USER"
DB_PASSWORD=""
# JWT
JWT_ACCESS_SECRET="aaaa"
JWT_REFRESH_SECRET="bbb"
GOOGLE_CLIENT_ID=""#for google auth
MODEL_SYNC="new"#'none', 'new', 'alter'
USE_SSL="false"During first launch use MODEL_SYNC="new" so that system creates DB schema automatically
- Go to ./server folder and run npm i
- Launch node index.js (on production you need to build ui first - server will only serve existing files by default)
- Go to ./ui and run npm i
- Run ng generate environments - this will create ui/src/environments/environment.ts file
- Add angular configs in environment files:
apiUrl: 'http://localhost:5001/api',
googleClientId: '' - for google auth support, same as GOOGLE_CLIENT_ID - Start UI with ng serve or ng build (ng build is expected for production)
Use docker if needed
Project may contain unused files and commented code