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:
- Node.js (>= 20.x)
- pnpm (>= 10.x)
- Python (>= 3.10)
- Docker & Docker Compose (Optional, but highly recommended)
- Groq API Key (Required for AI Goal Generation features)
Method 1: Using Docker (Recommended)
Running TaskMind via Docker provides an isolated, consistent environment without needing to install Python dependencies or Node modules manually.
-
Clone the Repository:
git clone https://github.com/KietTruongTuan/TaskMind.git cd TaskMind -
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 -
Build and Start Containers: Run the following from the root directory:
docker compose up --build -dThe development server will now be running. Code edits on your local machine will live-update inside the container.
-
Access the Application:
- Frontend: http://localhost:3000
- Backend API Docs (Swagger): http://localhost:8000/api/docs
-
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)
- Open a terminal and navigate to the project root.
- Initialize and activate a Python virtual environment:
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate - Install dependencies:
pip install -r BE/requirements.txt - Set up environment variables inside BE/.env as shown in the Docker method.
- Apply database migrations:
cd BE python manage.py migrate
2. Frontend Setup (Next.js)
- Open a new terminal instance in the project root.
- 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