mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 05:31:09 -05:00
- Restructure project: moved Django backend to backend/ directory - Add frontend/ directory for future Next.js application - Add shared/ directory for common resources - Fix critical Django import errors: - Add missing sys.path modification for apps directory - Fix undefined CATEGORY_CHOICES imports in rides module - Fix media migration undefined references - Remove unused imports and f-strings without placeholders - Install missing django-environ dependency - Django server now runs without ModuleNotFoundError - Update .gitignore and README for new structure - Add pnpm workspace configuration for monorepo setup
3.3 KiB
3.3 KiB
ThrillWiki Django + Vue.js Monorepo
A modern monorepo architecture for ThrillWiki, combining a Django REST API backend with a Vue.js frontend.
🏗️ Architecture
This project uses a monorepo structure that cleanly separates backend and frontend concerns:
thrillwiki-monorepo/
├── backend/ # Django REST API
├── frontend/ # Vue.js SPA
└── shared/ # Shared resources and documentation
🚀 Quick Start
Prerequisites
Development Setup
-
Clone the repository
git clone <repository-url> cd thrillwiki-monorepo -
Install dependencies
# Install frontend dependencies pnpm install # Install backend dependencies cd backend && uv sync -
Start development servers
# Start both frontend and backend pnpm run dev # Or start individually pnpm run dev:frontend # Vue.js on :3000 pnpm run dev:backend # Django on :8000
📁 Project Structure
Backend (/backend)
- Django REST API with modular app architecture
- UV package management for Python dependencies
- PostgreSQL database (configurable)
- Redis for caching and sessions
Frontend (/frontend)
- Vue 3 with Composition API
- TypeScript for type safety
- Vite for fast development and building
- Tailwind CSS for styling
- Pinia for state management
Shared (/shared)
- Documentation and deployment guides
- Shared TypeScript types
- Build and deployment scripts
- Docker configurations
🛠️ Development Workflow
Available Scripts
# Development
pnpm run dev # Start both servers
pnpm run dev:frontend # Frontend only
pnpm run dev:backend # Backend only
# Building
pnpm run build # Build for production
pnpm run build:frontend # Frontend build only
# Testing
pnpm run test # Run all tests
pnpm run test:frontend # Frontend tests
pnpm run test:backend # Backend tests
# Code Quality
pnpm run lint # Lint all code
pnpm run format # Format all code
Backend Commands
cd backend
# Django management
uv run manage.py migrate
uv run manage.py createsuperuser
uv run manage.py collectstatic
# Testing
uv run manage.py test
🔧 Configuration
Environment Variables
Create .env files for local development:
# Root .env (shared settings)
DATABASE_URL=postgresql://user:pass@localhost/thrillwiki
REDIS_URL=redis://localhost:6379
SECRET_KEY=your-secret-key
# Backend .env
DJANGO_SETTINGS_MODULE=config.django.local
DEBUG=True
# Frontend .env
VITE_API_BASE_URL=http://localhost:8000/api
📖 Documentation
🚀 Deployment
See Deployment Guide for production setup instructions.
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
📄 License
This project is licensed under the MIT License.