Documentation Index Fetch the complete documentation index at: https://mintlify.com/YamiDarknezz/task-forge-api/llms.txt
Use this file to discover all available pages before exploring further.
Get TaskForge API running locally and make your first authenticated request.
Prerequisites
Python 3.11+
Git
curl or any HTTP client (Postman, HTTPie, etc.)
Local setup
Clone the repository
git clone https://github.com/YamiDarknezz/task-forge-api.git
cd task-forge-api
Create a virtual environment
python -m venv venv
source venv/bin/activate
python - m venv venv
venv\Scripts\activate
Install dependencies
pip install -r requirements.txt
Configure environment variables
Open .env and set at minimum: FLASK_APP=run.py
FLASK_ENV=development
SECRET_KEY=change-me-in-production
JWT_SECRET_KEY=change-me-jwt-in-production
For local development you don’t need to configure Azure SQL. When the AZURE_SQL_* variables are absent, the API automatically falls back to a local SQLite database.
Initialize the database
This creates the SQLite database and seeds the default roles (admin and user).
Start the API
The API is now running at http://localhost:5000. The interactive Swagger UI is available at http://localhost:5000/api/docs.
Register a user
curl -X POST http://localhost:5000/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "testuser",
"email": "test@example.com",
"password": "Password123!",
"first_name": "Test",
"last_name": "User"
}'
Response: {
"success" : true ,
"data" : {
"id" : 1 ,
"username" : "testuser" ,
"email" : "test@example.com" ,
"first_name" : "Test" ,
"last_name" : "User" ,
"is_active" : true ,
"role" : { "id" : 2 , "name" : "user" },
"created_at" : "2024-01-01T00:00:00"
},
"message" : "Usuario registrado con exito"
}
Login and get tokens
curl -X POST http://localhost:5000/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "test@example.com",
"password": "Password123!"
}'
Response: {
"success" : true ,
"data" : {
"access_token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"refresh_token" : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ,
"user" : {
"id" : 1 ,
"username" : "testuser" ,
"email" : "test@example.com" ,
"role" : { "name" : "user" }
}
},
"message" : "Inicio de sesion exitoso"
}
Save the access_token — you’ll use it in the Authorization header for all subsequent requests.
Create your first task
Replace YOUR_ACCESS_TOKEN with the token from the previous step: curl -X POST http://localhost:5000/api/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"title": "My first task",
"description": "Created via the TaskForge API",
"priority": "high",
"status": "in_progress",
"due_date": "2024-12-31T23:59:59"
}'
Response: {
"success" : true ,
"data" : {
"id" : 1 ,
"title" : "My first task" ,
"description" : "Created via the TaskForge API" ,
"status" : "in_progress" ,
"priority" : "high" ,
"due_date" : "2024-12-31T23:59:59" ,
"tags" : [],
"created_at" : "2024-01-01T00:00:00"
},
"message" : "Tarea creada con exito"
}
Docker alternative
If you prefer Docker, you can skip the Python setup entirely:
cp .env.example .env
docker-compose up --build
The API will be available at http://localhost:5000 once the container starts. See the Docker guide for details.
Next steps
Authentication Learn about JWT tokens, refresh flow, and RBAC roles.
API Reference Full documentation for all 26 endpoints.
Configuration Configure the API for different environments.
Deployment Deploy to Azure App Service with CI/CD.