Skip to content

imranpollob/task-time-tracker-api

Repository files navigation

Task Todo Tracker API (Laravel Backend)

This is the backend API for the Task Todo Tracker app, built with Laravel.

Requirements

  • PHP >= 8.1
  • Composer
  • MySQL or compatible database

Installation

  1. Clone the repository and enter the backend folder:
    cd task-todo-tracker-api
  2. Install dependencies:
    composer install
  3. Copy the example environment file and configure your database credentials:
    cp .env.example .env
    # Edit .env to set DB_DATABASE, DB_USERNAME, DB_PASSWORD
  4. Generate the application key:
    php artisan key:generate
  5. Run database migrations and seeders:
    php artisan migrate --seed
  6. Start the development server:
    php artisan serve
    The API will be available at http://localhost:8000.

Usage

  • API routes are defined in routes/api.php.
  • Main models: app/Models/Task.php, TaskTime.php, User.php.
  • Authentication uses Laravel Sanctum (config/sanctum.php).

Developer Commands

  • Run tests:

    php artisan test
    # or
    vendor/bin/phpunit
  • Run migrations:

    php artisan migrate
  • Seed database:

    php artisan db:seed
  • Drop all tables, re-run all migrations, and re-seed the database

    php artisan migrate:fresh --seed

Project Structure

  • app/Models/ — Eloquent models
  • app/Http/Controllers/ — API controllers
  • routes/api.php — API endpoints
  • database/migrations/ — DB schema
  • database/seeders/ — Seed data

API Integration

  • The frontend communicates with this backend via REST endpoints.
  • Ensure CORS settings in config/cors.php allow requests from the frontend.

For more details, see the Laravel documentation: https://laravel.com/docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published