/TikTok-Hack-athon

Anthony and Marouane's submission for the second Headstarter Hackathon, a full-stack social media web-app with real-time notifications!

Primary LanguageGo

TikTok Hack (athon)

Contents

About

This is the web app and server built by Anthony and Marouane for Headstarter's second hackathon!

It features a fully functional web app built in Next.js and web server built in Golang. Features include user authentication, posts, and a real-time notification system using Redis PubSub and WebSockets.

Stack

  • Next.js
  • Golang - Gin
  • Redis
  • Railway
  • Docker
  • AWS
  • Google Cloud
  • WebSocket

Front-end

Anthony was responsible for the front-end design and implementation using Next.js and TypeScript. He interfaced to all of the back-end, as well as the system to keep the WebSocket connection for real-time notifications.

Homepage

Homepage

Sign-up form

Sign up form

Back-end

The web API was built by Marouane in Golang using the Gin http framework. It includes endpoints for user authentication, a real-time notification system for each post built using WebSockets and Redis PubSub.

Endpoints

Users

  • GET /api/users/:username - Get a user

Posts

  • GET /api/posts - Get all posts
  • GET /api/posts/:username - Get all posts for a user
  • POST /api/posts - Create a post for a user, body: { title: string, content: string } headers: { Authorization: string }

Admin

  • DELETE /api/admin/users/:username - Delete a post for a user, headers: { admin_key: string }

Auth

  • POST /api/auth/signup - Create a user, body: { username: string, password: string }
  • POST /api/auth/login - Login, body: { username: string, password: string }

Demo

2024-08-18.17-07-34.mp4