Skip to content

The backend is written in Node.js using Nestjs and Postgres as the database. (Prisma is used as the ORM). The frontend is written in Flutter.

Notifications You must be signed in to change notification settings

aaqyaar/jutsa-api

Repository files navigation

Jutsa Voting Backend

JUTSA ( Jamhuriya University Technology Students Association ) is a student association at Jamhuriya University of Science and Technology. This app allows students to vote for their favorite candidates.

The backend is written in Node.js using Nestjs and Postgres as the database. (Prisma is used as the ORM). The frontend is written in Flutter.

Features

  • Authentication
  • Authorization
  • Competitors
  • Votes
  • Upload Image
  • Docker Support

Requirements

  • Node.js
  • Nestjs CLI
  • Postgres
  • Yarn
  • Docker (optional)

Installation

git clone https://github.com/aaqyaar/jutsa-api.git
cd jutsa-api
yarn install

Running the api

# development
yarn start:dev
# production mode
yarn start:prod

API Documentation

Method Endpoint Description
POST /api/auth/register Create a new user
POST /api/auth/login Authenticate a user
GET /api/auth/me Get current user
GET /api/auth/logout Logout current user
GET /api/users Get all users
GET /api/users/:id Get a user
POST /api/competitor Create a competitor
GET /api/competitor Get all competitors
GET /api/competitors/:id Get a competitor
POST /api/votes Create a vote
GET /api/votes Get all votes
GET /api/votes/:id Get a vote
POST /api/upload/image Upload an image (pass formData)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Docker

docker compose up -d (detach mode)

About

The backend is written in Node.js using Nestjs and Postgres as the database. (Prisma is used as the ORM). The frontend is written in Flutter.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published