Akelni is a food delivery backend system designed for scalability, security, and performance, built using Go and modern backend best practices.
| Category | Technology | Key Features & Benefits |
|---|---|---|
| Language | Go (Golang) | Strong performance, built-in concurrency, and simple syntax. |
| Framework | Gin | Lightweight, high-speed HTTP framework with middleware support. |
| Database | PostgreSQL | Reliable relational database with strong transactional support. |
| DB Access | sqlx & pgx | High-performance drivers; keeps SQL control without ORM overhead. |
| Auth | JWT | Stateless authentication using Access/Refresh token strategy. |
| API Style | RESTful | Resource-based endpoints with JSON request/response formats. |
To ensure long-term maintainability, the project adheres to the following standards:
- Clean Architecture: Clear separation of concerns between business logic and external layers.
- RBAC: Role-Based Access Control for Admin and User.
- Configuration: Environment-based settings for different deployment stages.
- Robustness: Strict input validation and standardized error handling with proper HTTP status codes.
install code
git clone https://github.com/AhmedZeyad/akalni.gitrun
cd akalni
# install packages
go mode tidy
# build
go build -o temp
# run exe app
tempAll env comes with Default value
PORT: 8000
DB_PORT: localhost
DB_HOST: 5432
DB_USER: ahmed
DB_PASSWORD: admin
DB_NAME: akalni
IS_DEV: false
IS_LOCAL: false
GMAIL_APP_PASSWORD: ""
OTP_EMAIL_SENDER: ""
JWT_SECRET: secret
JWT_EXPIRE: 1
REF_JWT_EXPIRE: 24
OTP_EMAIL_SENDER: ""
OTP_NUMBER_OF_RETRIES: 3
OTP_NUMBER_OF_RESEND: 3
EMAIL_REVERIFICATION_AFTER: 30Base URL: localhost:@PORT/api
| Method | Endpoint | Description |
|---|---|---|
| HEAD | /ping |
Ping the API |
| -------- | ------------------------------------------- | ------------------------------------- |
| POST | /admin/users |
Create a new admin user |
| POST | /admin/login |
Admin login |
| POST | /admin/resetpassword |
Reset admin password |
| -------- | ------------------------------------------- | ------------------------------------- |
| GET | /admin/orders |
Retrieve admin orders |
| PUT | /admin/orders/status |
Update order status |
| -------- | ------------------------------------------- | ------------------------------------- |
| GET | /admin/restaurants |
Search restaurants |
| GET | /admin/restaurantsbyid |
Retrieve restaurant by ID |
| POST | /admin/restaurants |
Create a restaurant |
| PUT | /admin/restaurants |
Update a restaurant |
| PUT | /admin/restaurants/status |
Update restaurant status |
| -------- | ------------------------------------------- | ------------------------------------- |
| GET | /admin/categories |
Retrieve all categories |
| POST | /admin/categories |
Create a category |
| PUT | /admin/categories |
Update a category |
| DELETE | /admin/categories |
Delete a category |
| PUT | /admin/categories/status |
Update category status |
| -------- | ------------------------------------------- | ------------------------------------- |
| GET | /admin/products |
Retrieve all products |
| POST | /admin/products |
Create a product |
| PUT | /admin/products |
Update a product |
| DELETE | /admin/products |
Delete a product |
| PUT | /admin/products/status |
Update product status |
| -------- | ------------------------------------------- | ------------------------------------- |
| POST | /singup |
Sign up a new client |
| POST | /login |
Client login |
| POST | /refresh |
Refresh JWT token |
| GET | /profile |
Retrieve client profile |
| -------- | ------------------------------------------- | ------------------------------------- |
| POST | /email/verification/send |
Send email verification OTP |
| POST | /email/verification/resend |
Resend email verification OTP |
| POST | /email/verification/verify |
Verify email OTP |
| POST | /email/update/send/otp |
Send OTP for email update |
| POST | /email/update/resend/otp |
Resend OTP for email update |
| POST | /email/update/verify/otp |
Verify email update OTP |
| -------- | ------------------------------------------- | ------------------------------------- |
| GET | /restaurantsbyid |
Retrieve restaurant by ID |
| GET | /restaurants |
Retrieve active restaurants |
| POST | /orders |
Create a new order |