A fullstack Facebook-like social network with followers, profiles, posts, groups, notifications, and chats. Built with Go (backend), Next.js (frontend), SQLite, and Docker Compose.
- Authentication: Registration, login, sessions & cookies, optional avatar, nickname, about me.
- Profile: Public/private profiles, posts feed, followers/following.
- Posts: Create posts/comments with images/GIFs, configurable privacy.
- Followers: Follow/unfollow, request system for private profiles.
- Groups: Create/join groups, invite/accept requests, group posts, events.
- Chat: Private and group chats with WebSockets and emojis.
- Notifications: Follow requests, group invites, events, real-time alerts.
backend/
├── cmd/main.go
├── Dockerfile
├── internal/
│ ├── db/
│ │ ├── migrations/sqlite
│ │ ├── followersQuery/
│ │ ├── notificationQuery/
│ │ ├── profileQuery/
│ │ ├── query/
│ │ ├── sqlite/
│ │ └── uploads/
│ ├── handlers/
│ ├── models/
│ └── utils/
└── server/
├── middleware.go
└── server.go
frontend/
├── package.json
├── Dockerfile
└── pages/SQLite database:
backend/internal/db/sqlite/data_base.db
Migrations:backend/internal/db/migrations/sqlite
docker-compose up --build- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
uploads_data→ stores uploaded filesdb_data→ stores SQLite database
- All services run on
app-networkfor internal communication
- Fully responsive UI
- Communicates with backend via
NEXT_PUBLIC_BACKEND_URL - Development:
cd frontend
npm install
npm run dev- Handles API requests, database operations, and WebSockets
- Auto-applies migrations on startup via
sqlite.go - Run locally:
cd backend
go run cmd/main.go- Passwords hashed with bcrypt
- Session & cookie authentication
- Input validation for all endpoints
- Go standard packages
- Gorilla Websocket
- golang-migrate / sql-migration
- SQLite3
- bcrypt
- UUID
- Fullstack development (Next.js + Go)
- Authentication with sessions & cookies
- Docker Compose for multi-container apps
- Real-time communication with WebSockets
- SQL database management & migrations
MIT License
💡 Tip: Your docker-compose.yml is already configured to run both backend and frontend together. Just run:
docker-compose up --buildFrontend will automatically connect to backend at
http://backend:8080inside the Docker network.