A comprehensive SaaS solution for managing orders, inventory, customers, and payments.
- Create customized order forms
- Manage products and inventory
- Process orders and track status
- Generate pick lists
- View statistics and trends
- Full access to all producer features
- Manage users and permissions
- Handle subscription plans
- Create discount codes
- Frontend: React with TypeScript, Vite, and Tailwind CSS
- Backend: Python with FastAPI
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth with JWT
- Deployment: Docker, GitHub Actions
order-management/
├── frontend/ # React frontend application
│ ├── src/ # Source code
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── services/ # API service functions
│ │ ├── utils/ # Utility functions
│ │ ├── context/ # React context providers
│ │ └── types/ # TypeScript type definitions
│ ├── public/ # Static assets
│ └── ... # Configuration files
├── backend/ # Python FastAPI backend
│ ├── app/ # Application code
│ │ ├── api/ # API routes
│ │ ├── core/ # Core functionality
│ │ ├── models/ # Data models
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utility functions
│ ├── tests/ # Test files
│ └── ... # Configuration files
├── docs/ # Documentation
├── e2e/ # End-to-end tests
├── .github/ # GitHub Actions workflows
└── docker-compose.yml # Docker configuration
- Node.js 18+
- Python 3.11+
- Git
- Docker and Docker Compose (optional)
-
Clone the repository:
git clone https://github.com/diffen77/order_management.git cd order_management
-
Install frontend dependencies:
cd frontend npm install
-
Install backend dependencies:
cd ../backend python -m venv venv # On Windows: venv\Scripts\activate # On Unix/MacOS: source venv/bin/activate pip install -r requirements.txt
-
Configure environment variables:
- Copy
frontend/env.example
tofrontend/.env
- Copy
backend/env.example
tobackend/.env
- Update with your Supabase credentials
- Copy
-
Clone the repository:
git clone https://github.com/diffen77/order_management.git cd order_management
-
Create a
.env
file in the project root with the required environment variables (see docs/docker-setup.md) -
Build and start the containers:
docker-compose up --build
-
Start the frontend development server:
cd frontend npm run dev
This will start the Vite development server at http://localhost:5173
-
Start the backend development server:
cd backend # Activate virtual environment if not using Docker uvicorn app.main:app --reload
This will start the FastAPI server at http://localhost:8000
-
Access the API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
cd frontend
npm test # Run all tests
npm run test:watch # Run tests in watch mode
cd backend
# Activate virtual environment if not using Docker
pytest # Run all tests
pytest app/tests/test_api.py # Run specific test file
cd e2e
npm test
The API follows RESTful conventions and is organized into the following resource groups:
- Authentication:
/api/auth/*
- User registration, login, and token management - Users:
/api/users/*
- User management and permissions - Orders:
/api/orders/*
- Order creation, processing, and status updates - Products:
/api/products/*
- Product catalog management - Inventory:
/api/inventory/*
- Inventory tracking and adjustments - Customers:
/api/customers/*
- Customer information management - Payments:
/api/payments/*
- Payment processing and tracking - Reports:
/api/reports/*
- Analytics and reporting
For detailed API documentation, see the Swagger UI at http://localhost:8000/docs when running the backend server.
The project includes GitHub Actions workflows for CI/CD pipeline:
- On push to main branch, tests are run and Docker images are built
- On release creation, Docker images are deployed to the production environment
See .github/workflows/
for the detailed configuration.
For manual deployment, see docs/docker-setup.md.
Please refer to CONTRIBUTING.md for information on how to contribute to the project.
This project is proprietary software. All rights reserved.