AREA (Automated Reactive Event Application) is a web application that triggers automatic actions based on user-defined events. It is built using Express.js for the backend and Vue.js for the frontend.
Before you start, make sure you have installed:
- Node.js and npm
- PostgreSQL for database management
-
Clone the repository:
git clone https://github.com/your-username/area.git cd area -
Set up your project. Create a
.envfile in therootfolder with the necessary environment variables:DATABASE_URL=postgresql://<POSTGRES_USER>:<POSTGRES_PASSWORD>@<DB_HOST>:<DB_PORT>/<POSTGRES_DB> POSTGRES_USER=<POSTGRES_USER> POSTGRES_PASSWORD=<POSTGRES_PASSWORD> POSTGRES_DB=<POSTGRES_DB> GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> GITHUB_CLIENT_ID=<GITHUB_CLIENT_ID> GITHUB_CLIENT_SECRET=<GITHUB_CLIENT_SECRET> SPOTIFY_CLIENT_ID=<SPOTIFY_CLIENT_ID> SPOTIFY_CLIENT_SECRET=<SPOTIFY_CLIENT_SECRET> DROPBOX_APP_KEY=<DROPBOX_APP_KEY> DROPBOX_APP_SECRET=<DROPBOX_APP_SECRET> DISCORD_CLIENT_ID=<DISCORD_CLIENT_ID> DISCORD_CLIENT_SECRET=<DISCORD_CLIENT_SECRET> DISCORD_BOT_TOKEN=<DISCORD_BOT_TOKEN> EMAIL_USER=<EMAIL_USER> EMAIL_PASSWORD=<EMAIL_PASSWORD> GITHUB_ACCESS_TOKEN=<GITHUB_ACCESS_TOKEN> BACKEND_URL=<BACKEND_URL> STRAVA_CLIENT_ID=<STRAVA_CLIENT_ID> STRAVA_CLIENT_SECRET=<STRAVA_CLIENT_SECRET>
-
Launch the server, the web app and the database:
sudo docker-compose up --build -d
The Vue.js frontend will start on http://localhost:8081.
The Express.js backend will start on http://localhost:8080.
The Swagger documentation will start on http://localhost:8080/docs
The PostgreSQL database will start on http://localhost:5432.
The Redis service will start on port 6379
If any error is encountered, make sure port 5432, 6379, 8080, 8081 are free on your computer
You can find our documentation inside the documentation folder:
- Technical Comparative Study (see doc:
./documentation/technical-and-comparative-study.md) - Database Comparative Study (see doc:
./documentation/database-comparative.md) - Testing Policy (see doc:
./documentation/testing-policy.md) - Libraries and Frameworks (see doc:
./documentation/useful-libraries-for-development.md) - Models of the Database (see doc:
./documentation/MODELS.md) - Route of the Database (see doc:
./documentation/ROUTES.md) - Route of the Front (see doc:
./documentation/ROUTES_FRONT.md) - Backend Worker architecture (see doc:
./documentation/backend-arch.md)
The API documentation for the backend can be accessed at http://localhost:8000/docs.
area/
├── backend/ # Express.js backend
│ ├── index.js # Main entry point for Express.js
│ ├── database.js # Database configuration
│ ├── models/ # Sequelize or custom data models
│ ├── routes/ # API routes
│ ├── Dockerfile # Dockerfile for the backend
│ └── .env # Environment variables file (add this)
├── frontend/ # Vue.js frontend
│ ├── android/ # Android project
│ ├── ios/ # Ios project
│ ├── public/ # Public static files
│ ├── src/ # Vue source code
│ ├── package.json # npm configuration file
│ ├── vue.config.js # Vue.js configuration file
│ ├── Dockerfile # Dockerfile for the frontend
│ └── .env # Environment variables file for frontend (add this)
├── mobile/ # Mobile folder
│ └── Dockerfile # Dockerfile for the mobile
├── README.md # Project documentation
├── .env # Environment variables file for docker-compose
└── docker-compose.yml # Docker compose file
The database is automatically created when the application starts for the first time if Sequelize or a similar ORM is used. If you'd like to manually create the database, ensure your database setup script in database.js is executed before running the backend server.
For live updates, both the Express.js backend and Vue.js frontend reload automatically when they detect changes in their respective source code.
- Backend: Use tools like nodemon for automatic restart when code changes.
- Install nodemon globally if not already installed:
npm install -g nodemon. - Start the backend using:
nodemon index.js.
- Install nodemon globally if not already installed:
- Frontend: Vue's development server automatically refreshes the browser when files are updated. Start it with
npm run dev.
This project is licensed under the MIT License. See the LICENSE file for details.