How tranluan258/go-with-me works
Project type and purpose
• This repository is actually a monorepo containing two independent Go projects:
• dsa-with-ThePrimeagen: a collection of data structures and algorithm implementations with tests
• go-chat: a full-stack real-time chat application built in Go
File structure
• Top level
• LICENSE, README.md
• dsa-with-ThePrimeagen (algorithms library)
• go-chat (webchat application)
• dsa-with-ThePrimeagen
• Organized by algorithm categories (arrays, hash-table, heap, etc.)
• Each directory contains .go implementation and _test.go
• go.mod defines module, no external dependencies beyond stdlib
• go-chat
• .air.toml, Dockerfile, Makefile, package.json, tailwind/postcss configs: indicates local dev tooling, containerization, frontend build (Tailwind CSS, optional JS)
• cmd/main.go: application entry point
• internal/
– config/firebase.go: OAuth2 or Firebase integration
– db: migrations and DB connection code
– handlers: HTTP endpoints for auth, messages, users, rooms, home
– helpers: reusable utilities (time-ago formatting)
– models: ORM or data model definitions for users, rooms, messages
– oauth2: OAuth2 setup/config
– server: HTTP server setup, middleware
– ws: websocket hub, client management, room broadcasting
• views/: static HTML templates, CSS, JS, assets
Key insights from README
• Points to two sub-projects but does not include architecture details
Elements
• Clear labels for each component: Browser, HTTP Server, WS Hub, DB, OAuth Service, Build Pipeline, Docker
Details
• Middleware chain inside server (e.g., authentication, logging)
• How migrations fit into the deployment process