Connect BQ is a smart urban mobility platform designed to modernize public transport in Barranquilla. It offers citizens a centralized tool to plan routes, receive real-time alerts, and access personalized features.
- The Project Team
- Project Status & License
- Frontend Documentation
- Backend Documentation
- Complete Technical Document
This project was developed by the following team:
- Sebastian Linero - Product Owner & Scrum Master
- Willman Giraldo - QA & Backend Developer
- Samuel Arenas - Backend Developer
- Santiago Comas - Frontend Developer
- Felipe Palmar - Frontend Developer
- Status: The project is currently in beta phase and represents the MVP (Minimum Viable Product).
- License: This project is licensed under the GNU General Public License v3.0.
This repository contains the web interface for Connect BQ, a platform designed to modernize urban mobility in Barranquilla. The frontend offers an intuitive and responsive experience, developed with HTML5, CSS (Tailwind), and JavaScript (ES6+), with Vite support for fast development.
The main purpose is to provide citizens with a centralized digital tool to efficiently plan public transport routes, with the ability to receive real-time alerts about route changes, check mobility information, and access personalized sections through an interactive dashboard.
- 📌 Multiple views: login, register, about, dashboard, errors (401, 404, 500).
- 🎨 Responsive UI built with TailwindCSS.
- 🗺️ Leaflet.js for map and route visualization.
- 📡 API consumption using
fetch. - ⚡ Optimized deployment on Vercel with Vite bundling.
The application is organized as a MPA (Multi-Page Application) where each view has its own HTML and associated JS.
src/
├── assets/ # Images and icons
├── css/ # Global styles and Tailwind
├── pages/ # Main views
│ ├── about/ # About view
│ ├── dashboard/ # User dashboard view
│ ├── login/ # Login + logic
│ ├── register/ # Register + logic
│ └── errors/ # Error pages (401, 404, 500)
├── index.html # Initial page
├── main.js # Global initialization
└── package.json # Dependencies configuration
- Frontend: HTML5, TailwindCSS, JavaScript (ES6+).
- Libraries: Leaflet.js for maps and routes.
- Dev tools: Vite, Node.js, npm.
- Deployment: Vercel.
- Clone the repository:
git clone https://github.com/tu-org/connect-bq-frontend.git cd connect-bq-frontend - Install dependencies:
npm install
- Start the development environment with Vite:
npm run dev
- Open in browser:
http://localhost:5173
- Register: user registration form.
- Login: authentication with validation.
- About: project description.
- Dashboard: main panel with map integration.
- Errors (401, 404, 500): custom status screens.
- Direct connection to the backend (authentication and routes API).
- Real-time data integration: Displaying real-time GPS location of buses on the map.
- Progressive Web App (PWA): Allowing users to "install" the application on their mobile devices and access it offline.
- Better modularization of reusable components.
The central API for the "Connect BQ" smart urban mobility platform. This service manages user authentication, route planning, and citizen alerts using Node.js, Express, and MongoDB.
The Connect BQ backend is built as a RESTful API using the Express framework on Node.js.
The flow is as follows:
- The client (Frontend) makes an HTTP request to an endpoint (e.g.,
POST /api/users). - The Express server receives the request and directs it to the appropriate router.
- A controller handles the business logic, validating input data.
- The controller interacts with Mongoose models to perform CRUD (Create, Read, Update, Delete) operations on the MongoDB database.
- The API returns a JSON response to the client.
- Runtime Environment: Node.js (v18.x or newer)
- Framework: Express.js
- Database: MongoDB (with MongoDB Compass as a management tool)
- Object Data Modeling (ODM): Mongoose
- Environment Variable Management:
dotenv - Testing: Jest and MongoDB Memory Server
Follow these steps to set up the project in your local development environment.
-
Prerequisites
- Node.js (v18.x or newer)
- NPM (comes with Node.js)
- Git
-
Installation
- Clone the repository:
git clone https://github.com/connect-bq/bq_connect.git cd connect-bq-frontend - Install project dependencies:
npm install
- Clone the repository:
This project requires environment variables to function. Create a file named .env in the root of the project and add the following variable:
# .env
# Port where the server will run
PORT=3001
# Connection URI to your local MongoDB database
# The database is named 'connect_bq'
MONGO_URI="mongodb://localhost:27017/connect_bq"In the package.json file, you will find the following scripts:
npm start: Starts the application in production mode.npm run dev: Starts the application in development mode using nodemon, which automatically restarts the server on file changes.npm test: Runs all project tests.
The main API endpoints are detailed below.
User Management
POST /users: Creates a new user.GET /users: Gets a list of all users.GET /users/:id: Gets a user by their ID.PUT /users/:id: Updates a user by their ID.DELETE /users/:id: Deletes a user by their ID.
Route History
PUT /users/:id/addRoute: Adds a route to a user's history.PUT /users/:id/removeRoute: Removes a route from a user's history.
Favorite Routes
PUT /users/:id/addFavorite: Adds a route to a user's favorites list.PUT /users/:id/removeFavorite: Removes a route from a user's favorites list.
Alerts Management
POST /alerts: Creates a new alert in the system.GET /alerts: Retrieves all active alerts in the system.
We use Mongoose to define the schema for our data.
- Model:
User(models/user-model.js) - Model:
Alert(models/alert-model.js)
This project is configured for a straightforward deployment on platforms like Vercel or Railway.
- Connect your GitHub repository to your Vercel account.
- Import the project. Vercel will detect that it is a Node.js project.
- Add the environment variables (
MONGO_URI) in the project settings. - Deploy. Vercel will handle the rest.
For a detailed description of the project's architecture, methodology, challenges, and future improvements, please refer to the complete technical document.