GSAA is a secure authentication system built with Go, Gorilla Sessions, JWT, PostgreSQL, and Clean Architecture.
GSAA provides a robust and secure authentication system with the following key features:
- User registration and account creation
- User login and session management
- User logout and session invalidation
- Token-based authentication using JWT (JSON Web Tokens)
- PostgreSQL database for data storage
- Clean Architecture design principles for modular and maintainable code
You can use the following repo for testing this project.
https://github.com/jeferagudeloc/nuxt-vue-tailwind-login.git
Follow the steps below to run the GSAA application:
- Clone the repository:
git clone https://github.com/jeferagudeloc/gorilla-sessions-auth.git
- Navigate to the project directory:
cd gorilla-sessions-auth
- Build and run the application using Docker Compose:
docker-compose up --build
This command will start the application along with the PostgreSQL database and Nginx proxy server.
- Access the application through your web browser:
http://localhost:18080
This will open the GSAA web interface where you can register, log in, and manage user accounts.
The following routes are available in the GSAA application:
/health
: Performs a health check to ensure the server is running./authentication
: Handles user authentication by validating credentials and generating a session token./logout
: Logs out the user by invalidating the session token and removing session data./users
: Handles user creation by creating a new user account.
The GSAA application uses the following tables in the PostgreSQL database:
users
: Stores user account information, including name, email, password, and status.companies
: Stores company information, linked to user accounts through a foreign key relationship.profiles
: Stores user profile information, linked to user accounts through a foreign key relationship.permissions
: Stores permission information for user profiles, linked to profiles through a foreign key relationship.