/Transact-API

Node Rest API for financial transactions

Primary LanguageTypeScriptMIT LicenseMIT

Transact API

wakatime

Transact API is a Node Rest API for credit and debit financial transactions.

Introductions 📖

🔎 About

The project was conducted for studies on REST APIs, developed in TypeScript, and utilizing technologies like Fastify, which efficiently handles HTTP requests, Knex, which simplifies database interaction, and various other tools that assist in the development process.

  • The user should be able to create an transaction.
  • The user should be able to obtain an transaction statement.
  • The user should be able to list all transactions that have occurred.
  • The user should be able to view a single transaction.

🔧 Technologies

✨ How to Run

  • Prerequisites

    • It is required to have Git installed and configured on your computer.
    • It is required to have NodeJS installed and configured on your computer.

1. Make a clone of the repository.

  $ git clone https://github.com/RafaelMotaAlvess/Transact-API.git

2. Install the project's dependencies via the terminal.

$ npm install

3. In the project folder, you will find a file named example.env Make a copy of it and rename it to .env

4. In the project folder, you will find a file named example.env. Make a copy of it and rename it to .env

5. (Optional) Add the port you desire by setting the environment variable "port."

   PORT= "Add the port you will use."

6. Run the migration

    npm run knex -- migrate:latest

7. Start the server.

    npm run dev

🚩 Endpoints

Method Description
POST /transactions Create new transaction
GET /transactions List all transactions
GET /transactions/:id Get a specific transaction
GET /transactions/summary Get the summary

📃 License

The project is under the license MIT license.


This application was developed under the mentorship of Rocketseat.