Monorepo containing:
- Backend: Django + Django REST Framework (in
tosan_django/) - Frontend: React (Create React App) + MUI (in
tosan_front/)
This setup is intended for local development where:
- Django serves the API (and potentially templates/static/media)
- React runs separately in development and calls the backend API
This project is a “vitrine” (showcase) website built for a steel holding company to present its products and offers in a comprehensive, user-friendly format.
It also includes a feature-rich admin panel with multi-layer, role-based access control, enabling different teams/roles to update and manage content efficiently based on the company’s operational needs.
tosan-website/
├─ .gitignore
├─ LICENSE
├─ tosan_django/
│ ├─ Pipfile
│ ├─ Pipfile.lock
│ ├─ manage.py
│ ├─ db.sqlite3
│ ├─ company_data/
│ ├─ dataresolve/
│ ├─ pages_data_api/
│ ├─ media/
│ ├─ static/
│ ├─ templates/
│ └─ tosan_django/
│ ├─ __init__.py
│ ├─ asgi.py
│ ├─ settings.py
│ ├─ urls.py
│ └─ wsgi.py
└─ tosan_front/
├─ package.json
├─ package-lock.json
├─ build/
├─ patches/
├─ public/
└─ src/
Notes:
tosan_django/db.sqlite3is currently committed (SQLite DB for development).- Backend CORS appears configured to allow React dev servers on
http://localhost:3000andhttp://localhost:3004.
- Python 3.10 (declared in
Pipfile) - Django 4.0.6
- Django REST Framework
- SQLite (default DB in
settings.py) - Gunicorn included (likely for production deployments)
- React 18
- Create React App (
react-scripts5) - MUI (Material UI)
- Redux Toolkit
- Uses
patch-package(postinstallrunsnpx patch-package)
- Git
- Python 3.10
- pipenv (recommended, because backend uses
Pipfile) - Node.js + npm (for the frontend)
- Python:
3.10.x - Node:
16+or18+(typical for CRA projects)
git clone https://github.com/AliJavanJ1/tosan-website.git
cd tosan-websitecd tosan_django
pipenv installpipenv shellEven though db.sqlite3 exists in the repo, running migrations is a good sanity check:
python manage.py migratepython manage.py createsuperuserpython manage.py runserverBackend will typically be available at:
http://127.0.0.1:8000/
Open a new terminal (keep backend running), then:
cd tosan_front
npm installnpm startFrontend will typically be available at:
http://localhost:3000/
The backend CORS_ALLOWED_ORIGINS allows:
http://localhost:3000http://localhost:3004
If you run the frontend on a different port, update:
tosan_django/tosan_django/settings.py
cd tosan_django
pipenv install
pipenv shell
python manage.py migrate
python manage.py runservercd tosan_front
npm install
npm start
npm run buildSee the LICENSE file in the repository root.