Innovative web platform for monitoring small construction sites in the city of Trento. This repository contains the backend services responsible for authentication, user management, construction site data, and real-time notifications.
- 🔐 Authentication & Authorization – Secure stateful API authentication using MongoDB.
- 🏗 Construction Site Management – CRUD operations for managing construction sites.
- 🔔 Real-time Notifications – Subscription system for users to receive updates on construction sites.
- 📊 API Documentation – Fully documented REST APIs.
- 📦 Scalability – Built with AdonisJS for a modular and maintainable backend.
- Framework: AdonisJS
- Database: MongoDB
- Authentication: Stateless authentication with JWT
Make sure you have the following installed:
git clone https://github.com/fiatlinuxorg/citium.git
cd citium
Install dependencies:
npm install
Create a .env
file in the root directory and configure your environment variables:
TZ=UTC
PORT=8000
HOST=localhost
LOG_LEVEL=info
APP_KEY=YOUR_APP_KEY
NODE_ENV=development
SESSION_DRIVER=cookie
MONGO_URI='mongodb://localhost:27017/citium'
JWT_SECRET=YOUR_SECRET_KEY
development:
node ace seed:database
npm run dev
production:
npm run build
node ace seed:database
cd build
npm ci --omit="dev"
node bin/server.js
The API will be available at http://localhost:8000
.
API documentation is available via Swagger:
http://localhost:8000/docs
- JWT Authentication: Protecting API endpoints
- CORS: Configured to allow secure cross-origin requests
This project is licensed under the MIT License.
💡 Building a smarter city, one construction site at a time!