🚀 1. Getting Started
This guide will help you set up TaskNexus on your local machine for development.
🛠️ Prerequisites
Before you begin, ensure you have the following installed:
- Node.js: Version 18.x or higher is required.
- Verify with:
node -v
- Verify with:
- npm: Comes bundled with Node.js.
- Verify with:
npm -v
- Verify with:
- Git: For version control.
- Database: A PostgreSQL database (Local or Cloud).
- Code Editor: VS Code is recommended (with Prisma extension).
📥 Installation
-
Clone the Repository
-
Install Dependencies We use standard
npmfor package management.
🔑 Environment Configuration
The application relies on several environment variables for database connections, AI services, and security.
- Create a
.envfile in the root directory. - Copy the following template:
# ------------------------------
# DATABASE
# ------------------------------
# Connection string for Prisma
# Format: postgresql://USER:PASSWORD@HOST:PORT/DATABASE?schema=public
DATABASE_URL="postgresql://postgres:password@localhost:5432/tasknexus"
# ------------------------------
# AI SERVICES (LLM Providers)
# ------------------------------
# Primary Provider (Required for optimal performance)
GEMINI_API_KEY="your_google_gemini_api_key_here"
# Fallback Providers (Optional but recommended for resilience)
# Used if Gemini hits rate limits (429) or is down
GROQ_API_KEY="your_groq_api_key_here"
MISTRAL_API_KEY="your_mistral_api_key_here"
# ------------------------------
# SECURITY & AUTH
# ------------------------------
# Secret key for signing sessions (if applicable) or other encryption
SESSION_SECRET="complex_random_string_at_least_32_chars"
# ------------------------------
# NODE CONFIG
# ------------------------------
# Use "development" locally, "production" on deployment
NODE_ENV="development"
Obtaining API Keys
- Gemini: Get a key from Google AI Studio.
- Groq: Sign up at Groq Console.
- Mistral: Available at Mistral Platform.
💾 Database Setup
TaskNexus uses Prisma ORM to manage the database schema.
-
Generate the Prisma Client: This creates the type-safe client based on your schema.
-
Push Schema to DB: This creates the tables in your database without needing migration files (great for dev).
-
Seed Data (Optional): If a
prisma/seed.tsorscripts/seed.jsexists, you can populate initial data.
🏃 Running the App
Start the development server:
- Open http://localhost:3000 in your browser.
- Login with default credentials (if seeded) or sign up a new user.
🔄 Common Commands Cheat Sheet
| Command | Description |
|---|---|
npm run dev |
Starts dev server (hot reload enabled). |
npm run build |
Builds the app for production. |
npm start |
Starts the production server (after build). |
npx prisma studio |
Opens a web GUI to view/edit database records. |
npx prisma db push |
Syncs schema changes to the DB. |