https://github.com/paudefclasspy/tech-task-be
Tech-Task-BE
https://github.com/paudefclasspy/tech-task-be
Last synced: 10 months ago
JSON representation
Tech-Task-BE
- Host: GitHub
- URL: https://github.com/paudefclasspy/tech-task-be
- Owner: paudefclasspy
- Created: 2025-03-21T20:37:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-21T21:40:03.000Z (over 1 year ago)
- Last Synced: 2025-03-28T22:34:59.124Z (about 1 year ago)
- Language: Python
- Size: 478 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Loan Calculator
A Django-based web application for managing and calculating loan invoices with a modern Bootstrap UI.
## ๐ Features
- User authentication and registration system
- Interactive dashboard with real-time calculations
- Multi-currency support
- Visual data representation using Chart.js
- RESTful API with Django REST Framework
- Responsive Bootstrap 5 UI
- Comprehensive test suite
## ๐ ๏ธ Tech Stack
- Python 3.9+
- Django 4.2.7
- Django REST Framework 3.14.0
- Bootstrap 5.1.3
- Chart.js
- SQLite (Development) / PostgreSQL (Production)
- pytest for testing
## ๐ง Installation
1. Clone the repository:
```
git clone https://github.com/yourusername/loan-calculator.git
cd loan-calculator
```
2. Create and activate a virtual environment:
```
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```
pip install -r requirements.txt
```
4. Set up the database:
```
python manage.py migrate
```
5. Create a superuser:
```
python manage.py createsuperuser
```
6. Run the development server:
```
python manage.py runserver
```
The application will be available at `http://127.0.0.1:8000/`
## ๐๏ธ Project Structure
```
loan_calculator/
โโโ manage.py
โโโ requirements.txt
โโโ core/
โ โโโ settings.py
โ โโโ urls.py
โ โโโ wsgi.py
โโโ apps/
โโโ accounts/
โ โโโ forms.py
โ โโโ views.py
โ โโโ urls.py
โโโ invoices/
โโโ models.py
โโโ services.py
โโโ views.py
โโโ templates/
```
## ๐งช Running Tests
The project uses pytest for testing. To run the test suite:
```
pytest
```
For more verbose output:
```
pytest -v
```
## ๐ Environment Variables
Create a `.env` file in the root directory with the following variables:
```
DEBUG=True
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///db.sqlite3
```
## ๐ Deployment
For production deployment:
1. Set `DEBUG=False` in settings
2. Update `ALLOWED_HOSTS`
3. Use a production-grade database (PostgreSQL recommended)
4. Configure static files serving
5. Set up proper security measures
## ๐ API Documentation
The API endpoints are available at:
- `/` - Dashboard
- `/invoices` - Invoices