NIddle is a middleware service that acts as an interface between the official University of Porto website (Sigarra) and the UNI mobile application. The primary goal of NIddle is to provide a stable, modern, and reliable API for the UNI app, abstracting away the complexities of the Sigarra website.
This approach allows for a more agile development process for the UNI mobile app, as changes in Sigarra can be handled by NIddle without requiring a new release of the mobile app. Additionally, NIddle introduces custom functionalities not available in Sigarra, such as a custom announcement system.
- Stable API: Provides a consistent API for schedules, exams, and other university data, protecting the mobile app from changes in the underlying source.
- Decoupled Architecture: Separates the mobile app from the university's web services, allowing for independent development and deployment cycles.
- Extensible: Easily add new features and endpoints to support the mobile app.
- Custom Functionalities: Includes additional features not present in Sigarra, such as a dedicated announcement system.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js (v22.x recommended)
- Docker
- Docker Compose
-
Clone the repository
git clone https://github.com/NIAEFEUP/NIddle cd NIddle
-
Set up environment variables
Copy the example environment file to
.env.local
for local development.cp .env.example .env.local
Now, open
.env.local
and fill in the required variables. -
Start the database
NIddle requires a PostgreSQL database. Use Docker Compose to start a local instance:
docker-compose up -d
-
Install dependencies
npm install
-
Run the application
npm run start:dev
The application will be running in watch mode at
http://localhost:3000
.
NIddle is fully containerized and can be easily built and run as a Docker image.
-
Set up Docker environment variables
Copy the example environment file to
.env.docker
.cp .env.example .env.docker
Open
.env.docker
and configure the variables for the Docker environment. -
Run the build script
The
build_image.sh
script will build the Docker image for you../build_image.sh
-
Run the run script
The
run_image.sh
script will start a container from the image you just built../run_image.sh
npm run build
: Compiles the project.npm run format
: Formats the code using Prettier.npm run start:prod
: Starts the application in production mode.npm run start:dev
: Starts the application in development mode with watch.npm run lint
: Lints the codebase.npm test
: Runs unit tests.npm run test:e2e
: Runs end-to-end tests.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.