Home - agoenks29D/exzly GitHub Wiki

Exzly is a modular, scalable, and developer-friendly base project built with Node.js and Express.js.
It is designed as a reusable boilerplate to help developers quickly build production-ready web applications by providing essential features such as:

  • ๐Ÿง‘โ€๐Ÿ’ผ Built-in User Management
  • ๐Ÿ”€ Modular Architecture with Git-based Feature Branching
  • โš™๏ธ Easy Feature Integration (just merge the branches you need!)

Instead of reinventing the wheel for every project, developers can simply clone Exzly, pick the features they want from the available branches, and start building right away.

๐ŸŒฑ Project Vision

"One codebase, many possibilities."

Exzly aims to simplify the repetitive setup phase of backend development by offering a strong, extensible starting point.

๐ŸŒณ Core Features

  • โœ… Built-in User Management (Authentication, Roles, Permissions)
  • ๐Ÿ”„ Environment-based Configuration System
  • ๐Ÿ› ๏ธ Pre-configured Linting and Testing (ESLint, Prettier, Jest)
  • ๐Ÿ” Secure by Default (Helmet, CORS enabled)
  • ๐Ÿ“ฆ Sequelize ORM for database operations
  • ๐Ÿงช Jest & Supertest for writing API tests

๐ŸŒฟ Feature Branches

Below is a list of feature branches available in this repository (subject to update as the project evolves):

Branch Name Brief Description
feature/blog Blogging and article module
feature/product Product and catalog module
feature/oauth OAuth integration (e.g., Google, Facebook)
feature/service-worker Custom Service Worker setup for PWA capabilities
feature/push-notification Push Notification support (Web Push)
feature/object-storage Integration with object storage (e.g., S3, MinIO)
...and more... More features planned or in progress

๐Ÿ“‚ Project Structure

โš ๏ธ Note: Some feature branches may introduce structural changes or add new directories to support their respective features. However, the base project (i.e., the main branch) follows the standardized structure shown below:

- database/                # Database-related files
  โ”œโ”€ migrations/           # Sequelize migration files
  โ””โ”€ seeders/              # Sequelize seeder files
- public/                  # Static assets (images, CSS, JS for frontend)
- src/                     # Main source code
  โ”œโ”€ config/               # App configuration (security, module, etc.)
  โ”œโ”€ helpers/              # Helper functions and utilities
  โ”œโ”€ middlewares/          # Express middleware (auth, error handling, etc.)
  โ”œโ”€ models/               # Sequelize models
  โ”œโ”€ routes/               # Route definitions
  โ”‚  โ”œโ”€ admin/             # Routes for admin panel
  โ”‚  โ”œโ”€ api/               # RESTful API routes
  โ”‚  โ””โ”€ web/               # Web (frontend) routes
  โ”œโ”€ utils/                # Utility modules (e.g., logger, debugger, JWT)
  โ”œโ”€ validators/           # Request validation using express-validator
  โ””โ”€ views/                # Nunjucks templates
     โ”œโ”€ admin/             # Nunjucks templates for admin views
     โ”œโ”€ email/             # Templates for email
     โ””โ”€ web/               # Public site templates

โš™๏ธ Project Environment

โš ๏ธ Note: Environment variables may vary across branches depending on the feature requirements (e.g., integrations with third-party services like Firebase, Web Push, or payment gateways). Below is the base environment configuration used in the main branch:

Variable Description Example Value Actions secrets and variables
TZ Time zone setting UTC variable
PORT Port number for the application to listen on 3000 secret
DEBUG Environment variable for debugging and logging express.* variable
APP_NAME Name of the application Exzly variable
NODE_ENV The environment the app is running in (e.g., development, production) development variable
TRUST_PROXY Trust proxy setting (1 enables trust) 1 secret
STORAGE_PATH Path to storage folder storage secret
SESSION_SECRET Secret key used for session management Exzly secret
SESSION_EXPIRATION Session expiration time 4h secret
ASSETS_URL Base URL for serving static assets (useful when using CDN to avoid hardcoding paths) / variable
HTTPS
ENABLE_HTTPS Enable or disable HTTPS true variable
SSL_KEY_FILE Path to the SSL key file for HTTPS PATH/TO/SSL_KEY_FILE.key secret
SSL_CERT_FILE Path to the SSL certificate file PATH/TO/SSL_CERT_FILE.crt secret
Database
DB_SYNC Enable or disable database sync true variable
DB_MODE Mode for database synchronization: alter (non-destructive changes), force (drops and recreates all tables) alter variable
DATABASE_NAME Name of the database exzly_development secret
DATABASE_USER Username used to connect to the database root secret
DATABASE_PASS Password for the database user (leave blank if not needed) secret
DATABASE_HOST Host address of the database server localhost secret
DATABASE_TIME Timezone offset for the database connection +00:00 secret
DATABASE_DIALECT Type of SQL dialect used (e.g., mysql, postgres) mysql secret
DATABASE_CONFIG Configuration file for advanced DB settings config.js or config.json secret
Security: JWT
JWT_SECRET Secret key for JWT authentication Exzly secret
JWT_EXPIRATION JWT expiration time 4h secret
SMTP
SMTP_PORT SMTP port 587 secret
SMTP_HOST SMTP server host sandbox.smtp.mailtrap.io secret
SMTP_FROM From email address used in SMTP No Reply <[email protected]> secret
SMTP_USER SMTP username db71a9eabfxxxx secret
SMTP_PASS SMTP password 74606e0fa9xxxx secret
Routes
WEB_ROUTE Base route for web pages / secret
API_ROUTE Base route for API endpoints /api secret
ADMIN_ROUTE Base route for admin panel /admin secret