Quick Start¶
This guide helps you get productive quickly with the Freeze Design codebase.
Development Workflow¶
1. Start the Services¶
Open three terminal windows:
2. Access the Application¶
| URL | Description |
|---|---|
http://localhost:3000 |
Main webshop |
http://localhost:8000/admin |
Django admin |
http://localhost:8000/api/docs/ |
API documentation |
Common Tasks¶
Adding a New API Endpoint¶
- Create the serializer in
backend/apps/<app>/serializers.py - Create the viewset in
backend/apps/<app>/views.py - Register in
backend/config/urls.pyrouter - Test at
http://localhost:8000/api/docs/
Adding a New React Component¶
- Create component in
frontend/components/ - Add types to
frontend/types/index.tsif needed - Create Storybook story in same directory
- Run
npm run storybookto preview
Running Tests¶
Useful Commands¶
Backend¶
# Create migrations
python manage.py makemigrations
# Apply migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser
# Shell access
python manage.py shell
# Validate OpenAPI schema
python manage.py spectacular --validate
Frontend¶
# Development server
npm run dev
# Production build
npm run build
# Linting
npm run lint
# Storybook
npm run storybook
# TypeDoc
npm run docs:typedoc
Next Steps¶
- Architecture Overview - Understand the system design
- Testing Guide - Write effective tests
- Deployment Guide - Deploy to production