Skip to content

Commit f24caf3

Browse files
Merge pull request #1 from MohammedNaser28/init-react-frontend
init the fornt end project and add tailwind
1 parent b159941 commit f24caf3

File tree

14 files changed

+2382
-0
lines changed

14 files changed

+2382
-0
lines changed

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Real-time Leaderboard
2+
3+
A full-stack system that provides real-time leaderboard tracking for users across multiple games or activities. The project demonstrates real-time data management, ranking logic, and scalable architecture using modern web technologies.
4+
5+
## Table of Contents
6+
7+
- [Overview](#overview)
8+
- [Features](#features)
9+
10+
## Overview
11+
12+
The **Real-time Leaderboard** project provides a platform where users can:
13+
14+
- Register and authenticate securely.
15+
- Submit scores for various games or activities.
16+
- View a global leaderboard that updates dynamically.
17+
- Track their own ranking in real time.
18+
- Generate reports of top players for a specific time period.
19+
20+
The system leverages Redis sorted sets for efficient real-time leaderboard management, making it scalable and performant.
21+
22+
## Features
23+
24+
- **User Authentication:** Secure user registration and login with session or JWT-based auth.
25+
- **Score Submission:** API endpoints to submit and update user scores.
26+
- **Leaderboard Storage:** Uses Redis sorted sets for storing and ranking scores.
27+
- **Real-Time Updates:** Automatic leaderboard refresh on score changes.
28+
- **User Rankings:** Query user rank and score efficiently.
29+
- **Top Players Report:** Generate reports for top players within a given date range.
30+
- **Dockerized Environment:** Full stack runs via Docker for consistent setup across environments.

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>leaderboard-frontend</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "leaderboard-frontend",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"react": "^19.1.1",
14+
"react-dom": "^19.1.1"
15+
},
16+
"devDependencies": {
17+
"@eslint/js": "^9.36.0",
18+
"@types/node": "^24.6.0",
19+
"@types/react": "^19.1.16",
20+
"@types/react-dom": "^19.1.9",
21+
"@vitejs/plugin-react": "^5.0.4",
22+
"autoprefixer": "^10.4.21",
23+
"eslint": "^9.36.0",
24+
"eslint-plugin-react-hooks": "^5.2.0",
25+
"eslint-plugin-react-refresh": "^0.4.22",
26+
"globals": "^16.4.0",
27+
"postcss": "^8.5.6",
28+
"tailwindcss": "^4.1.15",
29+
"typescript": "~5.9.3",
30+
"typescript-eslint": "^8.45.0",
31+
"vite": "^7.1.7"
32+
}
33+
}

0 commit comments

Comments
 (0)