A comprehensive application designed to manage both personal expenses and inventory. This application helps users track their spending, manage inventory items, categorize entries, and generate insightful analytics.
- Overview
- Features
- Technologies Used
- Getting Started
- Prerequisites
- Installation
- Usage
- Docker
- CircleCI/CD
The Expense-Inventory-Management application provides a seamless way to manage your finances and inventory. It allows users to record expenses, manage inventory items, categorize entries, and generate reports to analyze their financial and inventory data.
- Add and edit expenses
- Add and edit inventory items
- Categorize expenses and inventory
- View summary and detailed reports
- User authentication and authorization
Frontend: React
Backend: Django
Database: Sqlite3
Authentication: JWT (via django-rest-framework-simplejwt)
Styling: Bootstrap
To get a local copy up and running, follow these steps.
- Node.js and npm installed on your local machine.
- Clone the repository: git clone https://github.com/sreeneha1/Expense-Management.git
- Change directory: cd Expense-Management
- Backend Setup: cd Back-End/expense 'python -m venv venv'
- Activating the virtual environment:
- Linux/Mac:
source venv/bin/activate - Windows:
venv\Scripts\activate
- Linux/Mac:
- Install dependencies:
pip install -r requirements.txt - Make migrations to the database:
python manage.py makemigrationspython manage.py migrate - Run the server:
python manage.py runserver
- If prompted to create a superuser, follow these steps:
(Add your username and password, then proceed to the server)
python manage.py createsuperuser
- Frontend Setup: cd Front-End/expense-tracker
npm installnpm install framer-motionnpm start
- Register: Create a new account.
- Login: Access your account.
- Add Expense: Record a new expense by providing the amount, category, and date.
- Add Inventory Item: Record a new inventory item by providing the name, category, quantity, and price.
- View Expenses: View a list of all your expenses.
- View Inventory: View a list of all your inventory items.
- Generate Reports: View reports to analyze your spending and inventory data.
This guide provides instructions on how to deploy the Expense Management application using Docker. The application consists of two components: backend and frontend, each available as separate Docker images hosted on Docker Hub.
-
Docker Hub Username: tanmayee17
-
Repository URL: https://hub.docker.com/repository/docker/tanmayee17/expense-management/general
-
Available Tags
-
backend
-
frontend
-
To view all available tags, visit the Tags section of the repository.
- Pull the Docker Images
- Open your command line interface and run the following commands to pull the Docker images from Docker Hub:
- docker pull tanmayee17/expense-management:backend
- docker pull tanmayee17/expense-management:frontend
- Run the Docker Containers
-
Once the images are pulled, run the following commands to start the containers:
-
Run the Backend Container
-
docker run -d -p 8000:8000 tanmayee17/expense-management:backend
-
Run the Frontend Container
-
docker run -d -p 3000:3000 tanmayee17/expense-management:frontend
- Access the Application Open Google Chrome in incognito mode and navigate to: http://localhost:3000
-
CircleCI Configuration File: The main configuration file for CircleCI is named .circleci/config.yml and is located in the root directory of the project.
-
Executors:
- Backend Executor: Utilizes the Docker image tanmayee17/expense-management:backend to run Python-based steps.
- Frontend Executor: Utilizes the Docker image tanmayee17/expense-management:frontend to run Node.js-based steps.
- Jobs:
-
Backend Job:
-
Checkout: Checks out the repository code.
-
Check Python Version: Ensures the correct Python version is used.
-
Setup Backend Environment: Creates a virtual environment and installs dependencies.
-
Test Backend: Runs Django tests using python manage.py test.
-
Frontend Job:
-
Checkout: Checks out the repository code.
-
Check Node.js Version: Ensures the correct Node.js version is used.
-
Setup Frontend Environment: Installs frontend dependencies using npm install.
-
Test Frontend: Runs frontend tests using npm test.
- Workflow:
- Build and Test Workflow:
- Defines a workflow that runs both the backend and frontend jobs in parallel.
CircleCI executes the pipeline in the following sequence:
-
- Checkout Code:
-
Both backend and frontend jobs begin by checking out the latest code from the repository.
-
- Setup Environment:
-
Backend:
-
Sets up a Python virtual environment.
-
Installs required dependencies from requirements.txt.
-
Frontend:
-
Installs Node.js dependencies using npm install.
-
- Run Tests:
-
Backend: Executes Django tests using python manage.py test.
-
Frontend: Executes tests using npm test.
- ba16f2a3-1919-4c88-bd6e-047f50e9aa3e