Files
thrillwiki_laravel/README.md

107 lines
2.4 KiB
Markdown

<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
# ThrillWiki - Laravel/Livewire Implementation
This is the Laravel/Livewire implementation of ThrillWiki, maintaining feature parity with the original Django project.
## Prerequisites
- PHP 8.1 or higher
- PostgreSQL
- Node.js and npm
- Composer
## Setup Instructions
### 1. Environment Configuration
```bash
# Copy the example environment file
cp .env.example .env
# Generate application key
php artisan key:generate
```
Configure your `.env` file with the following essential settings:
```env
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=thrillwiki
DB_USERNAME=your_username
DB_PASSWORD=your_password
```
### 2. Database Setup
1. Create PostgreSQL database:
```sql
CREATE DATABASE thrillwiki;
```
2. Run migrations and seed the database:
```bash
php artisan migrate:fresh --seed
```
### 3. Install Dependencies
```bash
# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install
```
### 4. Start Development Servers
Run these commands in separate terminal windows:
```bash
# Start Laravel development server
php artisan serve
# Start Vite development server for asset compilation
npm run dev
```
For production:
```bash
npm run build
```
### 5. Clear Cache (If Needed)
```bash
php artisan cache:clear && php artisan config:clear && php artisan route:clear && php artisan view:clear
```
## Troubleshooting
1. **Assets Not Loading**
- Ensure Vite is running (`npm run dev`)
- For production, make sure assets are built (`npm run build`)
2. **Database Connection Issues**
- Verify PostgreSQL is running
- Check credentials in `.env` file
- Ensure database exists and is accessible
3. **Migration Errors**
- Check migration order in `database/migrations`
- Ensure database is empty when running `migrate:fresh`
## Development Guidelines
This implementation maintains strict feature parity with the original Django project. Key requirements:
- Feature-to-Feature matching with Django implementation
- Identical API responses and data structures
- Consistent UI/UX with original
- Test coverage matching Django functionality
For detailed development guidelines, refer to the project documentation.