Skip to content

About

Backend com o DB Postegres , rodando no render

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

54 Commits

Folders and files

Repository files navigation

🚀 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 Express Prisma JWT PostgreSQL


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:

node -v

Database: Make sure you have a database configured (e.g. PostgreSQL, MySQL, etc.).

Setup Steps Clone the repository:

git clone https://github.com/IvanM4rtin5/DtMoney-BackEnd.git

Go into your folder:

cd your-repository

Install the dependencies:

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.

DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
JWT_SECRET="your_jwt_secret"

Run Prisma migrations:

npx prisma migrate dev --name init

Start the server:

npm start

The server will be running at http://localhost:3000.

📂 Project Structure

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

💡 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

⭐ Testing on Insomnia

Image

⭐ Database in Beekeeper

Image


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


About

Backend com o DB Postegres , rodando no render

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages