Quick Start - KietTruongTuan/TaskMind GitHub Wiki

Quick Start Guide

This guide covers how to set up the TaskMind project on your local machine for development and testing.

TaskMind utilizes a monorepo setup containing both the Next.js frontend and Django backend. You can run the application seamlessly via Docker Compose (recommended) or manually from source.


Prerequisites

Ensure you have the following installed on your system:


Method 1: Using Docker (Recommended)

Running TaskMind via Docker provides an isolated, consistent environment without needing to install Python dependencies or Node modules manually.

  1. Clone the Repository:

    git clone https://github.com/KietTruongTuan/TaskMind.git
    cd TaskMind
    
  2. Configure Environment Variables: Create a .env file in the BE/ directory based on .env.example:

    API_KEY=your_groq_api_key_here
    DEBUG=True
    SECRET_KEY=your_django_secret_key
    
  3. Build and Start Containers: Run the following from the root directory:

    docker compose up --build -d
    

    The development server will now be running. Code edits on your local machine will live-update inside the container.

  4. Access the Application:

    • Frontend: http://localhost:3000
    • Backend API Docs (Swagger): http://localhost:8000/api/docs
  5. Stop the Containers:

    docker compose down
    

Method 2: Running from Source (Manual)

If you prefer to run the Backend and Frontend natively on your machine:

1. Backend Setup (Django)

  1. Open a terminal and navigate to the project root.
  2. Initialize and activate a Python virtual environment:
    python -m venv venv
    # On Windows:
    .\venv\Scripts\activate
    # On macOS/Linux:
    source venv/bin/activate
    
  3. Install dependencies:
    pip install -r BE/requirements.txt
    
  4. Set up environment variables inside BE/.env as shown in the Docker method.
  5. Apply database migrations:
    cd BE
    python manage.py migrate
    

2. Frontend Setup (Next.js)

  1. Open a new terminal instance in the project root.
  2. Install Node packages using pnpm:
    pnpm install
    

3. Start the Servers

You can start both servers concurrently using pnpm from the root directory:

# Runs both FE and BE concurrently
pnpm dev

# Alternatively, run them separately:
pnpm dev:fe
pnpm dev:be