Skip to content

PoizDev/devdesk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevDesk

Go Version Gin Framework PostgreSQL License

DevDesk is a comprehensive task and project management system built with Go and Gin, designed to streamline workflows and enhance team productivity. It provides tools for task tracking, project management, event coordination, and team collaboration.


πŸ“š Table of Contents


✨ Features

  • πŸ“‹ Task Management: Create, assign, track, and manage tasks with detailed status tracking.
  • πŸ“‚ Project Management: Organize tasks into projects with milestones and deadlines.
  • πŸ“… Event Coordination: Schedule and manage events with RSVP tracking.
  • πŸ‘₯ User Authentication: Secure login and registration system.
  • πŸ”’ Role-Based Access Control: Differentiated access levels for different user roles.
  • πŸ“Š Points System: Gamified task completion tracking.
  • πŸ—οΈ Modular Architecture: Clean separation of concerns with models, services, and controllers.
  • βš™οΈ Configuration Management: Centralized configuration with environment variable support.

πŸ“ Project Structure

/devdesk
β”œβ”€β”€ config/              # Configuration management
β”‚   β”œβ”€β”€ conf.yaml
β”‚   └── config.go
β”œβ”€β”€ controllers/         # API request handlers
β”‚   β”œβ”€β”€ usercontroller.go
β”‚   β”œβ”€β”€ eventservice.go
β”‚   └── ...
β”œβ”€β”€ db/                  # Database initialization and connection
β”‚   β”œβ”€β”€ connect.go
β”‚   └── initialize.go
β”œβ”€β”€ models/              # Database models and ORM
β”‚   β”œβ”€β”€ events.go
β”‚   β”œβ”€β”€ points.go
β”‚   β”œβ”€β”€ projects.go
β”‚   β”œβ”€β”€ tasks.go
β”‚   β”œβ”€β”€ teams.go
β”‚   └── users.go
β”œβ”€β”€ services/            # Business logic layer
β”‚   β”œβ”€β”€ authservice.go
β”‚   β”œβ”€β”€ eventservice.go
β”‚   β”œβ”€β”€ taskservice.go
β”‚   └── userservice.go
β”œβ”€β”€ middlewares/         # Custom middleware functions
β”‚   β”œβ”€β”€ auth.go
β”‚   └── health.go
β”œβ”€β”€ .air.toml           # Development server configuration
β”œβ”€β”€ .env.example        # Environment variable template
β”œβ”€β”€ compose.yaml        # Docker Compose configuration
β”œβ”€β”€ Dockerfile          # Docker image configuration
β”œβ”€β”€ go.mod              # Go module dependencies
β”œβ”€β”€ go.sum              # Go module checksums
└── main.go             # Application entry point

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Go (version 1.20 or higher)
  • PostgreSQL (version 15 or higher) OR Docker for running the database in a container
  • Git (for version control)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd devdesk
  2. Initialize the database

    Option A: Using Docker (Recommended)

    docker compose up -d

    Option B: Local PostgreSQL

    • Ensure PostgreSQL is running and you have access

    • Run the initialization script:

      go run -C db initialize.go
  3. Configure environment variables

    • Create a .env file from the template:

      cp .env.example .env
    • Edit .env and fill in your database credentials and other configuration values.

  4. Install dependencies

    go get ./...
  5. Start the development server

    go run main.go

    Alternatively, if you have air installed:

    air

βš™οΈ Configuration

The application uses go-yaml for configuration management. The default configuration file is located at config/conf.yaml.

Configuration Options

Section Key Type Description
server port string The port the server listens on
server base_url string The base URL of the application
database host string Database host
database port string Database port
database username string Database username
database password string Database password
database dbname string Database name
database ssl_mode string SSL mode (e.g., "disable")
jwt secret string JWT signing secret
logging level string Log level (e.g., "debug", "info")

Environment Variables

You can override any configuration value by setting the corresponding environment variable (e.g., DB_HOST, JWT_SECRET).


πŸ–₯️ Running the Application

Development Mode

For automatic reloading on code changes:

air

Or manually:

go run main.go

The server will start on http://localhost:8080 (or the port specified in the configuration).

Production Mode

For production deployment, use a production-ready server like:

npm run start

Build the Application

To create a production build:

make build

🌐 API Reference

Authentication

Method Endpoint Description
POST /auth/register Register a new user
POST /auth/login Login and receive JWT token

Users

Method Endpoint Description
GET /users/me Get current user profile (protected)

Tasks

Method Endpoint Description
GET /tasks Get all tasks (protected)
GET /tasks/:id Get task details (protected)
POST /tasks Create a new task (protected)
PUT /tasks/:id Update task details (protected)
DELETE /tasks/:id Delete a task (protected)

Projects

Method Endpoint Description
GET /projects Get all projects (protected)
GET /projects/:id Get project details (protected)
POST /projects Create a new project (protected)
PUT /projects/:id Update project details (protected)
DELETE /projects/:id Delete a project (protected)

Events

Method Endpoint Description
GET /events Get all events
POST /event Create a new event

🀝 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

Distributed under the GNU AGPLv3 License. See LICENSE for more information.

About

Scalable task and project management system built with Go & Gin. Includes built-in authentication, role-based access, and a points-based reward system.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors