Giter Club home page Giter Club logo

finance-manager's Introduction

Finance Manager

This application is powerful and scalable REST API for finance management.

Check out Swagger Documentation: https://finance-manager-d7x9.onrender.com/api

Image: https://hub.docker.com/r/stbasarab/finance-manager

Tech Stack:

  • NestJS
  • PostgreSQL
  • Prisma ORM
  • JWT
  • Passport.js
  • Docker
  • Swagger

How to set up it locally?

Firstly, clone this repo:

git clone https://github.com/fokaaas/finance-manager.git

Then install pnpm globally:

npm install -g pnpm

Install dependencies in project directory:

pnpm install

Create .env file with environment variables, that has this structure:

DATABASE_URL=
PORT=

Apply schema to your database:

pnpm prisma migrate

Run application:

pnpm start:dev

Database Schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

enum PaymentType {
  INCOME
  EXPENSE
}

model Payment {
  id          String      @id @default(uuid())
  type        PaymentType
  amount      Float
  description String
  category    Category?   @relation(fields: [categoryId], references: [id], onDelete: SetNull)
  categoryId  String?     @map("category_id")
  createdAt   DateTime    @default(now()) @map("created_at")
  updatedAt   DateTime    @updatedAt @map("updated_at")

  @@map("payments")
}

model Category {
  id          String    @id @default(uuid())
  name        String
  description String?
  createdAt   DateTime  @default(now()) @map("created_at")
  updatedAt   DateTime  @updatedAt @map("updated_at")
  payments    Payment[]

  @@map("categories")
}

Dockerization

Check out Dockerfile with docker-compose to create image.

finance-manager's People

Contributors

fokaaas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.