Skip to content

Ganeshshit/FinanceManageApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is Finance Management and Prediction Using available or past Data

Backend Setup

Table of Contents

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js (version 14.x or later)
  • npm (Node package manager, comes with Node.js)

Installation

  1. Clone the repository:

    git clone https://github.com/Ganeshshit/FinanceManageApp.git
    cd FinanceManageApp
    cd server
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory of the project and add your environment variables. For example:

    PORT=3000
    MONGO_URI=mongodb://localhost:27017/your-database
    Or
    MONGO_URI="mongodb+srv://gsb021:[email protected]/"
    PORT=1337

Running the Application

  1. Start the development server:

    npm run dev

    This will start the server using nodemon, which automatically restarts the server when file changes are detected.

    Project Structure


Server
   └──
    ├── data
    │     └──data.js
    ├── models
    │        ├── KPI.js
    │        ├── product.js
    │        └── Transaction.js
    ├── routes
    │       ├── daily-data.routes.js
    │       ├── kpi.routes.js
    │       ├── product.routes.js
    │       └── transaction.routes.js
    ├── node_modules
    ├── index.js
    ├── .env
    ├── .gitignore
    ├── package.json
    └── README.md

The project uses the following packages:

  • body-parser: Middleware to parse incoming request bodies.
  • cors: Middleware to enable Cross-Origin Resource Sharing.
  • dotenv: Loads environment variables from a .env file.
  • express: Fast, unopinionated, minimalist web framework for Node.js.
  • helmet: Helps secure Express apps by setting various HTTP headers.
  • mongoose: MongoDB object modeling tool designed to work in an asynchronous environment.
  • mongoose-currency: Mongoose schema type for currency values.
  • morgan: HTTP request logger middleware.
  • nodemon: Utility that monitors for any changes in your source and automatically restarts your server.

Frontend Setup

    cd client

Install dependencies:

```bash
npm install
```

Set up environment variables:

Create a .env file in the root directory of the project and add your environment variables. For example:

VITE_BASE_URL=http://localhost:1337

Running the Application

  1. Start the development server:

    npm run dev

Project Structure

.
├── node_modules
├── public
│   ├── vite.svg
│   └── ...
├── src
│   ├── assets
│   │   └── images
│   ├── components
│   │   └── Boxheader.tsx
|   |   ├──DashbardBox.tsx
| 
│   ├── pages
│   │   └── HomePage.js
│   ├── services
│   │   └── api.js
│   ├── styles
│   │   └── main.css
│   ├── App.js
│   ├── index.js
│   └── ...
├── .env
├── .gitignore
├── package.json
└── README.md

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked

  • Optionally add plugin:@typescript-eslint/stylistic-type-checked

  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

Host platform

Frontend host on : Vercel Api host on : Render