Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daily Tracking API

A professional task management API built with Go, Gin, and GORM.

Features

  • Categories: Organize tasks into categories (Work, Personal, etc.).
  • CUID for IDs: Enhanced security and collision resistance using string-based CUIDs for all records.
  • RESTful API: Full CRUD operations for both categories and tasks.
  • Database: PostgreSQL integration with GORM ORM and auto-migrations.
  • Environment Configuration: Uses .env for easy configuration.
  • CORS Support: Ready for frontend integration.
  • Clean Architecture: Organized structure for scalability and maintainability.

Getting Started

Prerequisites

  • Go (1.24+)
  • PostgreSQL

Installation

  1. Clone the repository.
  2. Install dependencies:
    go mod tidy
  3. Configure your database in .env:
    DB_HOST=localhost
    DB_USER=postgres
    DB_PASSWORD=5432
    DB_NAME=daily_tracking_db
    DB_PORT=5432
  4. Run the server:
    go run cmd/server/main.go

API Endpoints

Method Endpoint Description
POST /api/v1/categories Create a new category
GET /api/v1/categories List all categories (preloads tasks)
GET /api/v1/categories/:id Get details of a specific category
PUT /api/v1/categories/:id Update a category's information
DELETE /api/v1/categories/:id Delete a category
POST /api/v1/tasks Create a new task (can assign category_id)
GET /api/v1/tasks List all tasks
GET /api/v1/tasks/:id Get details of a specific task
PUT /api/v1/tasks/:id Update a task's information
DELETE /api/v1/tasks/:id Delete a task

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages