Skip to content

mamahda/vp_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VP Backend API

Backend service for Victoria Property, built with Go (Gin Framework) using Clean Architecture principles.
API Endpoint Documentations: Victoria Property API Docs


Tech Stack

  • Go 1.22+
  • Gin Gonic
  • MySQL
  • JWT Authentication
  • bcrypt
  • Clean Architecture (Domain, Repository, Service, Handler)

Project Structure

.
├── cmd/api/main.go            # Application entry point
├── internal
│   ├── config                 # App & DB configuration
│   ├── delivery/http          # HTTP layer
│   │   ├── handler            # Request handlers
│   │   ├── middleware         # JWT & admin middleware
│   │   └── routes.go          # Route definitions
│   ├── domain                 # Entities & domain errors
│   ├── repository             # Database access layer
│   └── service                # Business logic
├── migrations                 # SQL schema & seed data
├── pkg/utils                  # Shared utilities
└── README.md

Architecture Overview

Request
  ↓
Handler (HTTP)
  ↓
Service (Business Logic)
  ↓
Repository (Database)
  ↓
MySQL

Each layer has a single responsibility and is loosely coupled.


Authentication

  • JWT-based authentication
  • Token valid for 7 days
  • Authorization: Bearer <token>

How to Run

go mod tidy
go run cmd/api/main.go

Notes

  • Passwords are hashed using bcrypt
  • Admin-only routes protected via middleware
  • Pagination max limit: 100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages