This project is a Django-based API for retrieving sales order statistics, specifically calculating total and average sales amounts with and without including freight and tax, filtered by employee ID.
- Retrieve total and average sales amounts with and without freight and tax.
- Filter sales orders by employee ID.
- API documentation using Swagger.
- Python 3.12.4
- Django 5.0.7 or higher
- Django REST Framework
- django-filter
- drf-yasg (for Swagger documentation)
- Microsoft ODBC Driver for SQL Server
- pyodbc
-
Clone the repository:
git clone https://github.com/moomensaleem135/specsources.git cd backend
-
Download the AdventureWorks2022.bak file:
https://github.com/Microsoft/sql-server-samples/releases/download/adventureworks/AdventureWorks2022.bak Save the file in backend/scripts/
-
Run the development server:
docker-compose up -d
Swagger documentation is available at /swagger/
. This provides an interactive interface to test the API endpoints.
you can use yarn / npx too, it's up to you
cd frontend
yarn install
Make sure you already create .env
files on the root of the repo, you can use everything inside .env.example
as starter
First, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:7035 with your browser to see the result.