The Pirate API is the server-side backbone of the MsBridger AI Budget Planner app, responsible for handling all core functionalities, including user management, financial transactions, and communication with the AI engine powered by Google Gemini. This Django-based API delivers high performance, scalability, and security for managing financial data and powering personalized budget insights for users.
The Pirate API is the powerhouse of the MsBridger mobile app, offering a comprehensive backend for handling user data, financial tracking, and budget management. The API is designed using Django’s robust framework to ensure high availability and secure data handling.
This API serves the frontend mobile application, developed using React Native, and communicates with the Pirate AI engine for intelligent financial planning and budget predictions.
- User Authentication: Secure user authentication using Django's built-in system, with additional layers for permission management.
- Income & Expense Management: Handle income and expense transactions via RESTful APIs, providing a seamless flow for frontend interactions.
- Budget & Savings Tracking: Track user budgets, create custom savings plans, and monitor progress through REST endpoints.
- AI-Driven Financial Insights: Real-time data integration with the Google Gemini AI engine for personalized advice and predictive financial insights.
- Django Admin Integration: Full admin interface for managing users, transactions, and AI configurations.
- RESTful API Architecture: Follows REST conventions, offering predictable and well-structured routes for all resources.
- Mobile Frontend Integration: Seamlessly connects with the MsBridger mobile app, ensuring smooth data exchange and an intuitive user experience.
- Backend Framework: Django (with Django REST Framework)
- Database: PostgreSQL (or SQLite for local development)
- Authentication: Token-based authentication (with Django Rest Framework JWT)
- AI Integration: Google Gemini (connected via internal services for financial predictions)
- API Documentation: Fully documented with Postman
pirate-api/
├── bridger/ # Core Django project folder
│ ├── settings.py # Configuration and settings
│ ├── urls.py # Route management
│ ├── wsgi.py # WSGI application for deployment
├── api/ # Main app for handling API logic
│ ├── models.py # Database models (User, Income, Expenses, Budgets)
│ ├── views.py # API view logic (CRUD operations)
│ ├── serializers.py # Data serialization for API responses
│ ├── urls.py # API routing and endpoints
│ └── tests.py # Test cases for API functionality
├── manage.py # Django's utility script for management commands
├── requirements.txt # Python dependencies
└── README.md # This README file
- Mobile Frontend Repository: MsBridger Mobile App
- API Documentation: Pirate API Documentation
- Backend Source Code: Pirate API Repository
To get the Pirate API up and running locally, follow these steps:
Ensure you have the following installed on your system:
- Python 3.8+
- PostgreSQL (or SQLite for development)
- Git
-
Clone the repository:
git clone https://github.com/philiptitus/bridger.git cd bridger
-
Set up a virtual environment and install dependencies:
python -m venv env source env/bin/activate pip install -r requirements.txt
-
Set up your database (adjust your database credentials in
bridger/settings.py
):python manage.py migrate
-
Create a superuser for accessing the Django Admin:
python manage.py createsuperuser
-
Run the server:
python manage.py runserver
-
Navigate to
http://127.0.0.1:8000
to explore the API!
Explore the full API documentation, including detailed routes and response formats, through the following link:
This documentation includes:
- Authentication & User Management
- Income & Expense Endpoints
- Budget Tracking
- Savings Plans
- AI-Driven Financial Insights
This project is licensed under the MIT License. See the LICENSE file for more details.
- Philip Titus - GitHub
For any security concerns, please contact me at by mail. I take security seriously and appreciate any vulnerabilities being reported responsibly.
Pirate API © 2024 Philip Titus. All rights reserved.