Skip to content

AlexLup06/go-starter

Repository files navigation

go-starter

TODO

  • ✅ Create users with email

  • ✅ log in with email

  • ✅ Handle sessions with middleware

  • ✅ Log out functionality

  • ✅ Add redirects if not able the autheticate user

  • ✅ Reset password with Email

  • ✅ Signup with google and apple

  • ⬜ Polish Code

  • ⬜ Login with google and apple

  • ⬜ Implement proper caching of CSS and JS files.

Tech Stack

This project functions as a starter for any webapp. It uses the stack

  • Gin Web Framework
  • HTMX
  • Typescript
  • Tailwind CSS

For Bundeling, Minifying and Compiling TS to JS it uses Webpack. It also uses Docker. There is a make file which starts the whole stack in development and production mode.

Backend architecture

We will follow an MVP architecture for better separation of concerns. This is the request's life cycle.

flowchart TD
    Client --A middleware injects\n a db transaction here\n So the service can access the transaction \n using the context of the request--> Handler
    Handler --> Service
    Service --> Repository
    Repository --through gorm--> Gorm/[(postgresql)]

    Handler ~~~|"The handler:<br>Does gin specific request parsing<br> Uses a service to fulfill the request"| Handler
    Service ~~~|"The service:<br>Contains the business logic<br>Uses the domain models and repository interface"| Service
    Repository ~~~|"The repository is an interface <br> implemented by the files in pkg/db <br> It uses gorm to access the database"| Repository
Loading

About

A starter repo for Go projects with mail/social Authentication and MVP structure!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published