An open API service indexing awesome lists of open source software.

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

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