This project strictly follows a unified architecture constraint. Both the React frontend and Express backend are unified under a single package.json at the root of the project.
A single npm install handles dependencies for the entire application, and npm run dev boots both the Vite client and the Express backend concurrently.
-
Install Dependencies Run the single install command from the root directory:
npm install
-
Environment Variables Copy
.env.exampleto.envin the root directory and securely configure the credentials.cp .env.example .env
-
Start Development Server This single command starts the system concurrently:
npm run dev
The initial super-admin credentials must NOT be hardcoded. They are read exclusively from your .env file before starting the server.
- Ensure
ADMIN_USERNAMEandADMIN_PASSWORDare set in.env. - Start the server.
- Navigate to
http://localhost:5173/admin/login. - Log in using the exact username and password provided in the
.envfile.
The Brevo Mailer logic is isolated in a separate microservice located in the mailer-microservice/ directory.
To start the mailer:
cd mailer-microservice
npm install
cp .env.example .env # (Update with your Brevo SMTP credentials)
node server.jsThe main app communicates with this service via HTTP POST using the URL and API Key defined in the root .env.