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
- Host: GitHub
- URL: https://github.com/ivanm4rtin5/dtmoney-backend
- Owner: IvanM4rtin5
- Created: 2025-01-25T12:00:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-29T01:27:04.000Z (about 1 year ago)
- Last Synced: 2025-04-29T02:43:30.233Z (about 1 year ago)
- Topics: api-restful, backend, pm2, postegresql
- Language: JavaScript
- Homepage: https://dtmoney-financial-app.netlify.app/
- Size: 23.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
[](https://nodejs.org/)
[](https://expressjs.com/)
[](https://www.prisma.io/)
[](https://jwt.io/)
[](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
## 🚀 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

### ⭐ Testing on Insomnia

### ⭐ Database in Beekeeper

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