Trybe Football Club is a football game management application developed as part of the Backend module of the Web Development course at Trybe. This project allows users to manage matches, teams, and leaders simply and efficiently, using a robust and dockerized backend.
- Match Management: Creation, update, and finishing of ongoing matches.
- Team Management: Registration and manipulation of information about football teams.
- Login System: User authentication to ensure data security and integrity.
- Leaderboard: Retrieval of information about team standings in an easy-to-understand format.
- Node.js: JavaScript runtime environment on the server side.
- Express: Framework for building RESTful APIs.
- Sequelize: ORM (Object-Relational Mapping) for database manipulation.
- Docker: For containerization of the application, facilitating configuration and dependency management.
- TypeScript: For static typing, increasing code quality and maintainability.
The API has the following routes:
-
Teams
GET /teams
: Retrieves all teams.POST /teams
: Creates a new team.
-
Login
POST /login
: Authenticates the user.
-
Matches
GET /matches
: Retrieves all matches.POST /matches
: Creates a new match.PATCH /matches/:id
: Updates an ongoing match.PATCH /matches/:id/finish
: Finishes an ongoing match.
-
Leaderboard
GET /leaderboard
: Retrieves the standings of the teams.
-
Clone the repository:
git clone [email protected]:SamuelRocha91/trybeFutebolClube.git cd trybe-futebol-clube
-
Install the dependencies:
npm install
-
Configure Docker:
- Ensure that Docker is installed and running on your machine.
- You can use
docker-compose
to initialize the necessary services.
-
To run the application, use the command:
cd app docker-compose up --build
The application will start on the port specified by the environment variable
APP_PORT
, defaulting to 3001.