MoneyApp is a full-stack web application for managing personal finances, built with a Django REST Framework backend and a React frontend.
- User Authentication with JWT
- CRUD Operations for Transactions and Categories
- Dashboard with Financial Overview
- RESTful API for Seamless Data Management
- Backend: Django, Django REST Framework
- Frontend: React, Axios
- Database: SQLite
- Authentication: JWT
-
Install Prerequisites:
- Ensure you have Python and Node.js installed on your machine.
- Install Git if you haven’t already.
-
Clone the Repository:
- Open a command line or PowerShell and execute:
git clone https://github.com/Endorpheen/MoneyApp.git cd MoneyApp
- Open a command line or PowerShell and execute:
-
Set Up the Backend:
- Navigate to the backend directory:
cd backend
- Install the required packages:
pip install -r requirements.txt
- Apply database migrations:
python manage.py migrate
- Create a superuser for Django admin:
python manage.py createsuperuser
- Start the backend server:
python manage.py runserver # The backend will run on http://localhost:8000
- Navigate to the backend directory:
-
Set Up the Frontend:
- Navigate to the frontend directory:
cd ../frontend
- Install the required packages:
npm install
- Start the frontend server:
npm start # The frontend will run on http://localhost:3000
- Navigate to the frontend directory:
-
Install Docker:
- Download and install Docker Desktop. Ensure you select the Docker image for Windows.
-
Create a Directory for the Application:
- Create a separate folder on your computer where the project will reside (e.g.,
MoneyApp
).
- Create a separate folder on your computer where the project will reside (e.g.,
-
Open PowerShell in the Desired Directory:
- Navigate to the
MoneyApp
folder in Windows Explorer, right-click in an empty space, and select "Open PowerShell here."
- Navigate to the
-
Clone the Repository:
- In the opened PowerShell window, enter the following commands:
git clone https://github.com/Endorpheen/MoneyApp.git cd MoneyApp
- In the opened PowerShell window, enter the following commands:
-
Run the Application Using Docker:
- While in the project directory, execute:
docker compose up --build
- This command will create and start the necessary containers. The backend will be available at http://localhost:8000, and the frontend at http://localhost:3002.
- While in the project directory, execute:
-
Run Database Migrations:
-
First, you need to find the
container_id
for your backend container. To do this, run the following command to list all running containers:docker ps
-
Look for the container running the backend service and copy its
CONTAINER ID
. -
Once you have the
container_id
, run the migrations:docker exec -it <container_id> python manage.py migrate
-
-
Create a Superuser:
- Similarly, create a superuser by running the following command (replacing
<container_id>
with your backend container's ID):docker exec -it <container_id> python manage.py createsuperuser
- Follow the prompts in the terminal to enter the superuser credentials.
- Similarly, create a superuser by running the following command (replacing
-
Access the Application:
- You can now access the backend at http://localhost:8000 and the frontend at http://localhost:3002.
- Use the superuser credentials you just created to log in.
-
Managing Categories and Users:
- To modify your budget categories, you need to do this through the backend.
- The backend also allows you to add new users, edit transactions, and manage budgets.
-
Stopping Containers:
- To stop the application, run:
docker compose down
- To stop the application, run:
-
Restarting After Stopping:
- To restart the application after stopping it, simply run:
docker compose up
- If you need to rebuild the containers considering changes, use:
docker compose up --build
- To restart the application after stopping it, simply run:
If you don't want to clone the repository or set up the project manually, you can use the pre-built Docker images hosted on Docker Hub. These images contain everything needed to run the application.
-
Pull the backend image from Docker Hub:
docker pull end000/moneyapp-backend:latest
-
Pull the frontend image from Docker Hub:
docker pull end000/moneyapp-frontend:latest
-
Run the backend container:
docker run -d -p 8000:8000 end000/moneyapp-backend:latest
-
Run the frontend container:
docker run -d -p 3002:3002 end000/moneyapp-frontend:latest
-
Run Database Migrations (After Starting the Containers):
- First, find the
container_id
of the backend container by running:docker ps
- Then, run the migrations using the following command:
docker exec -it <container_id> python manage.py migrate
- First, find the
-
Create a Superuser:
- Similarly, create a superuser by running the following command (replacing
<container_id>
with your backend container's ID):docker exec -it <container_id> python manage.py createsuperuser
- Similarly, create a superuser by running the following command (replacing
Now your application should be fully functional with the backend available at http://localhost:8000 and the frontend at http://localhost:3002.
Detailed documentation for API endpoints is available in the API_DOCUMENTATION.md file.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.