An open API service indexing awesome lists of open source software.

https://github.com/ivanm4rtin5/dtmoney-backend

Backend com o DB Postegres , rodando no render
https://github.com/ivanm4rtin5/dtmoney-backend

api-restful backend pm2 postegresql

Last synced: 12 months ago
JSON representation

Backend com o DB Postegres , rodando no render

Awesome Lists containing this project

README

          

# 🚀 Transaction Management API
This project is a financial transaction management API, built with **Node.js**, **Express** and **Prisma**. It allows users to register, log in, create, read, update and delete transactions.

[![Node.js](https://img.shields.io/badge/Node.js-18.13.0-339933?logo=node.js)](https://nodejs.org/)
[![Express](https://img.shields.io/badge/Express-4.18.2-000000?logo=express)](https://expressjs.com/)
[![Prisma](https://img.shields.io/badge/Prisma-4.16.2-2D3748?logo=prisma)](https://www.prisma.io/)
[![JWT](https://img.shields.io/badge/JWT-8.5.1-000000?logo=json-web-tokens)](https://jwt.io/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-13.0-336791?logo=postgresql)](https://www.postgresql.org/)

---

## Features

- **User Authentication:**
- Register new users.
- Login of existing users with JWT token generation.

- **Transaction Management:**
- Create new transactions.
- List all user transactions.
- View a specific transaction.
- Update an existing transaction.
- Delete a transaction.

---

## 🛠️ Technologies Used

Node.js Express Prisma JWT PostgreSQL bcryptjs dotenv cors

## 🚀 How to Execute the Project
Requisites
Make sure you have **Node.js** installed on your machine. You can check the installed version with the command:

```bash
node -v
```
**Database**: Make sure you have a database configured (e.g. PostgreSQL, MySQL, etc.).

Setup Steps
Clone the repository:

```bash
git clone https://github.com/IvanM4rtin5/DtMoney-BackEnd.git
```
Go into your folder:
```
cd your-repository
```
Install the dependencies:

```bash
npm install
```
Set up the environment variables:

Create a .env file in the root of the project and set up the necessary environment variables, such as the database connection and the secret key for the JWT.

```env
DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
JWT_SECRET="your_jwt_secret"
```
Run Prisma migrations:
```bash
npx prisma migrate dev --name init
```
Start the server:

```bash
npm start
```
The server will be running at http://localhost:3000.

## 📂 Project Structure
```Copy
prisma/
├── migrations/ # Database migrations
├── dev.db # SQLite database (if applicable)
└── schema.prisma # Prisma schema
src/
├── assets/ # Images and other resources
├── config/ # Project settings
│ ├── auth.js # Authentication settings
│ └── prismaClient.js # Prisma Client settings
├── controllers/ # Route controllers
│ ├── UserController.js # User controller
│ └── TransactionController.js # Transaction controller
├── middleware/ # Middlewares
│ └── auth.js # Authentication middleware
├── models/ # Data models
│ ├── Transaction.js # Transaction model
│ └── User.js # User model
├── routes/ # API routes
│ ├── auth.routes.js # Authentication routes
│ ├── index.js # Route entry point
│ └── transaction.routes.js # Transaction routes
├── services/ # Business services
│ └── TransactionService.js # Transaction service
├── utils/ # Utilities
│ └── errors.js # Error handling errors
└── server.js # Application entry point
.gitignore # Files ignored by Git
README.md # Project documentation
package-lock.json # Dependency versions
package.json # Project dependencies
```
## 🔗 Related Links

- Project Frontend: [DT Money - Frontend](https://github.com/IvanM4rtin5/DtMoney-Frontend)

## 💡 My Effort and Dedication
This project was developed with a lot of effort and dedication, seeking to demonstrate my skills as a FullStack developer. Some of the challenges I faced and overcame include:

Database Integration: Setting up and using Prisma to manage the database.

Secure Authentication: Implementing JWT authentication with bcrypt for password encryption.

Transaction Management: Creating a robust API to manage financial transactions.

I believe this project reflects my ability to work with modern technologies and deliver high-quality solutions.

## 📧 Contact
If you have any questions or want to get in touch, feel free to send me a message:

**Name**: Ivan Martins

**Email**: ivanmarti.alves@gmail.com

**LinkedIn**: [https://www.linkedin.com/in/ivan-martins-alves/]

### ⭐ Project Images
Here are some images that illustrate how the project works:

### ⭐ Testing on Insomnia
![Image](https://github.com/IvanM4rtin5/DtMoney-BackEnd/blob/main/src/assets/image/Insomnia%2030_01_2025%2012_21_11.png)

### ⭐ Testing on Insomnia
![Image](https://github.com/IvanM4rtin5/DtMoney-BackEnd/blob/main/src/assets/image/Insomnia%2030_01_2025%2012_21_49.png)

### ⭐ Database in Beekeeper
![Image](https://github.com/IvanM4rtin5/DtMoney-BackEnd/blob/main/src/assets/image/dev.db%20-%20Beekeeper%20Studio%2030_01_2025%2012_26_59.png)

---

Thanks for checking out my project! I hope it showcases my skills and my commitment to excellence in software development. 😊

---