# 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 - **Python 3.11+** with [uv](https://docs.astral.sh/uv/) for backend dependencies - **Node.js 18+** with [pnpm](https://pnpm.io/) for frontend dependencies ### Development Setup 1. **Clone the repository** ```bash git clone cd thrillwiki-monorepo ``` 2. **Install dependencies** ```bash # Install frontend dependencies pnpm install # Install backend dependencies cd backend && uv sync ``` 3. **Start development servers** ```bash # 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 ```bash # 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 ```bash 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: ```bash # 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 - [Backend Documentation](./backend/README.md) - [Frontend Documentation](./frontend/README.md) - [Deployment Guide](./shared/docs/deployment/) - [API Documentation](./shared/docs/api/) ## 🚀 Deployment See [Deployment Guide](./shared/docs/deployment/) for production setup instructions. ## 🤝 Contributing 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Run tests and linting 5. Submit a pull request ## 📄 License This project is licensed under the MIT License.