An open API service indexing awesome lists of open source software.

https://github.com/manjurulhoque/threadly

A real-time discussion platform inspired by Threads, built with Golang and Next.js. Enables users to create, engage with, and manage threaded conversations seamlessly.
https://github.com/manjurulhoque/threadly

gin gin-framework gin-gonic golang nextjs

Last synced: 3 months ago
JSON representation

A real-time discussion platform inspired by Threads, built with Golang and Next.js. Enables users to create, engage with, and manage threaded conversations seamlessly.

Awesome Lists containing this project

README

          

# Threadly

A modern social media platform built with Next.js and Go, featuring real-time messaging, dark mode, and a clean UI.

Live: [Demo](http://threadly.manjurulhoque.com/)

## Features

- ๐Ÿ” Authentication with NextAuth.js and JWT
- ๐ŸŒ“ Dark/Light mode theming
- ๐Ÿ’ฌ Real-time chat messaging
- ๐Ÿงต Thread creation and interactions
- ๐Ÿ’– Like/Unlike functionality
- ๐Ÿ”” Real-time notifications
- ๐Ÿ‘ฅ User profiles and following system
- ๐Ÿค Community features // todo
- ๐Ÿ“ฑ Responsive design
- ๐Ÿ” User search functionality // todo
- ๐Ÿ–ผ๏ธ Image upload support // todo
- ๐ŸŒ WebSocket integration

## Preview

### Home Page
![Home Page](./screenshots/t1.png)

### Profile Page
![Profile Page](./screenshots/t2.png)

### Single thread with comments Page
![Single thread with comments Page](./screenshots/t3.png)

### Notifications Page
![Notifications Page](./screenshots/t4.png)

### Real time chat Page
![Chat Page](./screenshots/t5.png)

## Tech Stack

### Frontend
- โš›๏ธ Next.js 14 (App Router)
- ๐ŸŽจ Tailwind CSS
- ๐Ÿ”„ Redux Toolkit
- ๐ŸŽญ Shadcn/ui Components
- ๐ŸŽฃ React Hook Form
- โœจ TypeScript
- ๐Ÿ”’ NextAuth.js
- ๐ŸŒ WebSocket (react-use-websocket)
- ๐Ÿ“… date-fns
- ๐ŸŽฏ Zod Validation

### Backend
- ๐Ÿš€ Go
- ๐ŸŽฏ Gin Framework
- ๐Ÿ—„๏ธ PostgreSQL
- ๐Ÿ”‘ JWT Authentication
- ๐Ÿ”„ GORM
- ๐ŸŒ WebSocket
- ๐Ÿ”’ bcrypt

## Getting Started

First, run the development server:

```
Frontend
cd frontend
npm install
npm run dev
```

```
Backend
cd backend
go mod download
go run cmd/app/main.go
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Environment Setup

Create a `.env` file in the frontend directory with the following variables:

env
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
BACKEND_BASE_URL=http://localhost:8080

Create a `.env` file in the backend directory:

env
DB_HOST=localhost
DB_USER=your-db-user
DB_PASSWORD=your-db-password
DB_NAME=threadly
DB_PORT=5432
JWT_SECRET=your-jwt-secret

## Learn More

To learn more about the technologies used:

- [Next.js Documentation](https://nextjs.org/docs)
- [Tailwind CSS](https://tailwindcss.com/docs)
- [Go Documentation](https://golang.org/doc/)
- [Gin Framework](https://gin-gonic.com/docs/)