Developer: Ebrahim Bangdiwala
Email: ebb.bang@gmail.com
A Laravel-based flashcard application for creating, managing, and studying flashcards with public API access.
- PHP: ^8.2
- Laravel: ^12.0
- Database: SQLite (development)
- User Authentication: Complete registration, login, email verification, and password reset
- Deck Management: Create, read, update, and delete flashcard decks with public/private visibility
- Card Management: Full CRUD operations for flashcards with question/answer pairs
- Study System: Interactive Livewire-powered study interface with progress tracking and scoring
- Public API: RESTful API endpoints for accessing public decks and cards (Sanctum authentication)
- Authorization: Policy-based access control ensuring users can only access their own data
- Modern UI: Built with Livewire Flux components and Tailwind CSS
- Docker
- Docker Compose
- PHP ^8.2 & Composer (Initial Setup)
- Clone the repository
- Copy environment file:
cp .env.example .env
- Install PHP dependencies:
composer install
- Start Laravel Sail:
./vendor/bin/sail up -d
- Install Node dependencies:
./vendor/bin/sail npm install
- Generate application key:
./vendor/bin/sail artisan key:generate
- Create SQLite database file
touch database/database.sqlite
- Run migrations and seed the database:
./vendor/bin/sail artisan migrate --seed
- Build assets:
./vendor/bin/sail npm run build
After running the database seeder, you can log in with the following default credentials:
- URL: http://0.0.0.0/login (when using Sail)
- Email: test@example.com
- Password: password
Start the development environment:
./vendor/bin/sail upFor development with hot reloading:
./vendor/bin/sail npm run devYou can create a shell alias for easier usage:
alias sail='./vendor/bin/sail'Then use commands like:
sail up
sail artisan migrate
sail composer installRun the test suite:
./vendor/bin/sail artisan testRun tests with coverage:
./vendor/bin/sail artisan test --coverageOr using PHPUnit directly:
./vendor/bin/sail php ./vendor/bin/phpunitThis project uses Laravel Pint for code formatting:
./vendor/bin/sail php ./vendor/bin/pintThe application provides the following public API endpoints (requires Sanctum token authentication):
GET /api/decks- List all public decksGET /api/decks/{deck}/cards- Get cards from a specific public deckGET /api/cards- List all cards from public decksGET /api/user- Get authenticated user information
Generate an API token from the Settings > API Access page in the application.
- Users table with Laravel's default authentication fields
- Decks table with
user_idforeign key andis_publicboolean for visibility control - Cards table with
deck_idforeign key, storing question/answer pairs - API Logs table for tracking API usage with middleware
- Policies:
DeckPolicyandCardPolicyfor authorization using Laravel's built-in policy system - Input Validation: Form Request validation for all user inputs
- API Authentication: Laravel Sanctum for secure API access
- Authorization Middleware: Protecting routes and ensuring users can only access their own data
- Custom Middleware:
LogApiUsageMiddlewarefor API request logging - Resource Classes: API resources for consistent JSON output formatting
- Livewire Components: Modern, reactive UI without writing JavaScript
- Service Container: Dependency injection throughout the application
- Eloquent Relationships: Proper model relationships and query scopes
This project was developed with assistance from AI tools to enhance development efficiency while maintaining code quality and understanding.
- Claude Code CLI (Anthropic) - Primary AI assistant for code generation, debugging, and architectural guidance
- ChatGPT - Secondary AI assistant for generation of checklist, text, error messages, logo, etc.
When: Creating checklist for tasks and subtasks to perform. Throughout the development process for various features and components
Where: AI assistance was used across multiple files and modules:
- Refactor GitHub CI workflows with linting, testing badge and coverage badge
- Generate SVG Logo
- Generate Boilerplate Readme.md
- Identify if Form Request can be used with Livewire component
- Generate warning messages for API Token generate and storage
- Generate Tailwind Table template for to show API Logs in Settings > API Access page
- Analyze if all tasks in checklist are complete
Why: AI tools were used to:
- Accelerate boilerplate content generation (Readme.md, CI Workflows, warning messages, etc.)
- Create custom logo quickly
- Quickly generate tailwind templates for demo
- Proofread content and verify checklist completion
How: Effective prompting strategies included:
- Providing clear context about challenge description requirements
- Requesting specific details for Logo
- Asking to generate tailwind table that resembles Laravel Starter Kit
- Seeking code review and suggestions
- Requesting confirmation of checklist
All AI-generated code has been thoroughly reviewed, tested, and understood. The developer can explain any component's functionality, debug issues, and maintain the codebase independently. The AI assistance enhanced productivity while ensuring all code meets Laravel standards and project requirements.