A community-driven Q&A platform for comic book fans to ask, answer, and discuss their favorite stories, characters, and fan theories.
Built with Laravel 12, Blade components, Tailwind CSS v4, and Vite.
- Authentication: register, login, logout, profile
- Ask questions with tags
- Answer questions and mark a best answer (by question owner)
- Threaded replies to answers (comments)
- Paginated questions feed on Home
- Polished UI with Tailwind; comic background on auth and profile pages
- PHP 8.2+, Laravel 12
- Blade templating and Blade components
- Tailwind CSS v4 with Vite
- MySQL/PostgreSQL/SQLite (choose via .env)
- Clone and install dependencies
- PHP dependencies
composer install
- JS/CSS dependencies
npm install
- Create your environment file and app key
cp .env.example .env
php artisan key:generate- Configure your DB in .env (example for MySQL)
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=so_many_questions
DB_USERNAME=root
DB_PASSWORD=secret
- Create the database (if needed)
CREATE DATABASE so_many_questions;- Run migrations (and optionally seed)
php artisan migrate
# optionally
php artisan db:seedOption A: Use separate terminals
php artisan serve
npm run devOption B: One command with concurrency (uses scripts in composer.json)
composer run devThis starts:
- Laravel dev server
- Queue listener
- Log viewer (pail)
- Vite dev server
Then open http://127.0.0.1:8000
- app/Http/Controllers
- AnswerController.php
- CommentController.php
- QuestionController.php
- RegisteredUserController.php
- app/Models
- User.php, Question.php, Answer.php, Comment.php, Tag.php
- resources/views
- Home.blade.php
- auth/ (login, register, profile)
- questions/ (create, show)
- components/ (layout, header, footer, link, button, input-section)
- resources/css/app.css (Tailwind v4 entry)
- routes/web.php
- database/migrations (users, questions, answers, comments, tags, pivot)
Note: In the current setup, question routes are inside auth middleware (sign-in required to view). You can move show/index outside auth if you want public visibility.
Auth
- GET /login – show login
- POST /login – authenticate
- GET /register – show register
- POST /register – create user
- DELETE /logout – log out
Profile
- GET /profile – profile page
- PATCH /profile – update profile (requires current_password)
- DELETE /profile – delete account (requires current_password)
Questions
- GET / – Home (questions index)
- GET /questions – questions index (same data as home)
- GET /questions/create – ask a question
- POST /questions – store question
- GET /questions/{question} – show a question (with answers and replies)
- PATCH /questions/{question} – update question (stub)
- DELETE /questions/{question} – delete question (stub)
Answers
- POST /questions/{question}/answers – add an answer
- POST /questions/{question}/answers/{answer}/best – mark answer as best (question owner only)
Replies (comments)
- POST /answers/{answer}/comments – add a reply to an answer
- User
- hasMany Question, hasMany Answer
- Question
- belongsTo User
- hasMany Answer
- belongsToMany Tag
- Answer
- belongsTo User, belongsTo Question
- hasMany Comment
- boolean is_best
- Comment
- belongsTo User, belongsTo Answer
- Tag
- belongsToMany Question
Reusable Blade components in resources/views/components:
- layout: page wrapper with optional bgImage prop
- We pass bgImage="images/comic-bg.jpg" on login, register, and profile for a comic background
- header, footer: document shell (includes @vite)
- link: nav link styling
- button: primary button
- input-section: label + slot + validation error helper
Home page
- Inline question form for authenticated users
- Question cards with title, snippet, tags, author, time, answers count
Question page
- Full question view with tags and body
- Answer form (+ mark best button for owner)
- Replies per answer with reply form
MIT