Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

113 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Go-Epic โ€” Full Stack Coding Platform

A scalable full-stack coding platform for practicing, managing, and organizing coding problems, datasets, solutions, and learning resources.


๐Ÿ“– Overview

Go-Epic is a full-stack coding platform built with Golang, React, and Tailwind CSS that helps developers manage coding problems, datasets, topics, and solutions through scalable APIs and a modern frontend interface.

The platform provides authentication, protected routes, search capabilities, analytics APIs, dataset management, and role-based access control.

Core Objectives

  • Create a scalable coding platform architecture
  • Provide structured problem management
  • Enable secure authentication flows
  • Support dataset import/export operations
  • Deliver responsive frontend experiences
  • Offer analytics and monitoring capabilities

โœจ Features

Backend Features:-

โœ… RESTful API Architecture
โœ… CRUD Operations
โœ… JWT Authentication & Authorization
โœ… Role-Based Access Control
โœ… Protected Routes
โœ… Middleware Support
โœ… Validation Layer
โœ… Pagination, Filtering & Sorting
โœ… Search APIs
โœ… Statistics APIs
โœ… Error Handling
โœ… API Metrics
โœ… Health Monitoring
โœ… Rate Limiting

Frontend Features:-

โœ… Responsive Design
โœ… React Component Architecture
โœ… API Integration Layer
โœ… Authentication UI
โœ… Search Interface
โœ… Dashboard Pages
โœ… Dataset Explorer
โœ… Admin Management Views


๐Ÿ— System Architecture

graph TD

A[React Frontend]
B[REST API Layer]
C[Authentication Service]
D[Business Logic]
E[Database]
F[Datasets]

A --> B
B --> C
B --> D
D --> E
D --> F
Loading

๐Ÿ›  Tech Stack

Layer Technology
Frontend React.js
Styling Tailwind CSS
Backend Golang
API REST
Authentication JWT
State Management React Hooks / Context
HTTP Client Axios
Database MongoDB
Deployment Render / Railway / Vercel

๐Ÿ“‚ Project Structure

go-epic/

โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ cmd/
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ””โ”€โ”€ main.go
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ””โ”€โ”€ App.jsx
โ”‚
โ””โ”€โ”€ README.md

โš™ Installation

Clone Repository

git clone <repo-url>

cd go-epic

Backend Setup

cd backend

go mod tidy

go run main.go

Backend runs on:

http://localhost:8080

Frontend Setup

cd frontend

npm install

npm run dev

Frontend runs on:

http://localhost:5173

๐Ÿ” Environment Variables

Create .env

PORT=8080

DB_URI=your_database_uri

JWT_SECRET=secret_key

REFRESH_SECRET=refresh_key

CLIENT_URL=http://localhost:5173

RATE_LIMIT=100

๐Ÿ”‘ Authentication Flow

sequenceDiagram

User->>Frontend: Login

Frontend->>Backend: Credentials

Backend->>Auth Service: Validate

Auth Service-->>Backend: Generate JWT

Backend-->>Frontend: Access Token

Frontend->>Protected APIs: Attach Token
Loading

๐ŸŒ API Base URL

http://localhost:8080/api/v1

๐Ÿ“š API Documentation

Problems API

Method Route Purpose
GET /problems Fetch all problems
POST /problems Create problem
PATCH /problems/ Update problem
DELETE /problems/ Delete problem

Authentication API

Method Route
POST /auth/register
POST /auth/login
POST /auth/logout
GET /auth/profile

Search API

Endpoint Description
/search/problems?q=keyword Search problems
/search/topics?q=query Search topics
/search/solutions?q=query Search solutions

Statistics API

Route
/stats/problems
/stats/topics
/stats/datasets

๐Ÿ“Š Dataset Import

  1. Download dataset
  2. Place file inside:
backend/datasets/
  1. Import:
POST /problems/import-json

๐Ÿ“ฅ Example API Request

POST /auth/login

{
  "email":"demo@gmail.com",
  "password":"password123"
}

Response:

{
   "success": true,
   "token":"jwt_token"
}

โŒ Error Response

{
   "success": false,
   "message": "Validation Failed"
}

๐Ÿšฆ Rate Limiting

Applied on:

  • Authentication APIs
  • Search Endpoints
  • Bulk Operations
  • Admin Routes

Example:

100 requests / minute

๐Ÿงช Testing

Backend:

go test ./...

Frontend:

npm run test

๐Ÿš€ Deployment

Service Platform
Backend Railway / Render
Frontend Vercel / Netlify
Database MongoDB Atlas

Build frontend:

npm run build

๐Ÿ”ฎ Future Roadmap

  • Contest System
  • Leaderboards
  • AI Recommendations
  • Discussion Forums
  • Multi-language Support
  • Real-time Collaboration

๐Ÿค Contributing

fork repository

create feature branch

commit changes

push branch

create pull request

๐Ÿ“„ License

Licensed under the MIT License.


Built using โค๏ธ with Golang, React, and Tailwind CSS

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages