Production-style monorepo for a full-stack AI chat product:
backend/: Laravel 11 REST API with Sanctum authentication and Groq integrationfrontend/: Next.js 15 application with a complete marketing + product UI and authenticated chat flow
- Token-based auth (
register,login,logout,me) via Laravel Sanctum - Persistent conversation history per user
- AI reply generation through Groq (
/api/chat) - Modern frontend built with App Router, Tailwind CSS, and reusable UI components
- CI-ready project structure with lint/type/build/test checks
.
├── backend/ # Laravel API
├── frontend/ # Next.js app
├── docs/
│ ├── API.md
│ ├── ARCHITECTURE.md
│
├── setup.sql # Optional manual DB bootstrap
└── .github/workflows/ci.yml
- PHP 8.2+
- Composer
- Node.js 20+
- MySQL 8+ (or MariaDB)
cd backend
cp .env.example .env
composer install
php artisan key:generate
php artisan migrate
php artisan servecd frontend
cp .env.example .env.local
npm install
npm run devDefault local URLs:
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:8000
DB_*variables for database connectionGROQ_API_KEY(required for/api/chat)- Optional:
GROQ_BASE_URI(defaulthttps://api.groq.com/openai/v1)GROQ_CHAT_PATH(default/chat/completions)GROQ_DEFAULT_MODEL(defaultllama-3.3-70b-versatile)
NEXT_PUBLIC_API_URL(defaulthttp://localhost:8000)
php artisan servephp artisan migratephp artisan test
npm run devnpm run lintnpm run typechecknpm run build
Current local checks:
backend:php artisan testpassesfrontend:npm run lint,npm run typecheck, andnpm run buildpass
- Architecture:
docs/ARCHITECTURE.md - API reference:
docs/API.md - Backend details:
backend/README.md - Frontend details:
frontend/README.md - LinkedIn-ready project summary:
docs/LINKEDIN_FEATURE.md
- Contribution guide:
CONTRIBUTING.md - Security policy:
SECURITY.md - Code of conduct:
CODE_OF_CONDUCT.md - Changelog:
CHANGELOG.md
Licensed under MIT. See LICENSE.