GO Rest API (Documentation)


This is a documentation Go-lang article API based on project Workshop WAOW Tel-U Surabaya.

System Flow

Authentication Layer

The system uses a JWT-based authentication flow. All users must authenticate through the /auth endpoints :

Regular User Access

This is handled by AuthMiddleware() through /api routes. Regular users can :

Admin Access

Admin routes protected by AuthMiddleware() and AdminMiddleware() to ensure dual verification of authentication and authorization. Administrators privileges :

API Flow.png








Database Design

Consists of 3 table; user, category, and article. User-to-Article relationship are One-to-Many, and Categories-to-Article are also One-to-Many

Screenshot 2025-04-06 143620.png



Endpoint Documentation