Skip to content

Commit 38b0ccf

Browse files
committed
.
2 parents f198549 + d60e02c commit 38b0ccf

7 files changed

Lines changed: 647 additions & 312 deletions

File tree

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ Currently, two official plugins are available:
1111

1212
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.
1313

14-
15-
1614
# DCODE Platform
1715

1816
A modern, collaborative platform for student developers to connect, learn, and build open-source projects together. Powered by React, Vite, Zustand, and Framer Motion for a fast, immersive experience.
1917

2018
---
2119

2220
## 🚀 Overview
21+
2322
DCODE Platform is designed to accelerate your growth as a developer by providing:
23+
2424
- A vibrant community of student innovators
2525
- Hands-on project management tools
2626
- Rich analytics and dashboards
@@ -30,6 +30,7 @@ DCODE Platform is designed to accelerate your growth as a developer by providing
3030
---
3131

3232
## ✨ Features
33+
3334
- **Authentication & Onboarding**: Secure login, onboarding flow, and profile management
3435
- **User Directory**: Discover and connect with other developers
3536
- **Dashboard**: Track your progress, streaks, milestones, and PR activity
@@ -42,6 +43,7 @@ DCODE Platform is designed to accelerate your growth as a developer by providing
4243
---
4344

4445
## 🛠️ Tech Stack
46+
4547
- **Frontend**: React, Vite
4648
- **State Management**: Zustand
4749
- **Animations**: Framer Motion
@@ -53,6 +55,7 @@ DCODE Platform is designed to accelerate your growth as a developer by providing
5355
---
5456

5557
## 📁 Folder Structure
58+
5659
```
5760
public/ # Static assets (images, fonts, videos)
5861
src/
@@ -71,6 +74,7 @@ src/
7174
---
7275

7376
## ⚡ Getting Started
77+
7478
1. **Clone the repo:**
7579
```bash
7680
git clone https://github.com/DCODE-HQ/DCODE-platform.git
@@ -90,6 +94,7 @@ src/
9094
---
9195

9296
## 🖥️ Usage
97+
9398
- **Sign up or log in** to access the dashboard and community features
9499
- **Edit your profile** to add portfolio links and achievements
95100
- **Browse users** and connect with other developers
@@ -99,7 +104,9 @@ src/
99104
---
100105

101106
## 🤝 Contributing
107+
102108
We welcome contributions! To get started:
109+
103110
1. Fork the repository
104111
2. Create a new branch (`git checkout -b feature/your-feature`)
105112
3. Make your changes
@@ -109,12 +116,14 @@ We welcome contributions! To get started:
109116
---
110117

111118
## 📄 License
119+
112120
This project is licensed under the MIT License.
113121

114122
---
115123

116124
## 📬 Contact
117-
- **Team DCODE**: [contact@dcodehq.com](mailto:contact@dcodehq.com)
125+
126+
- **Team DCODE**: [dcode.codes@gmail.com](mailto:dcode.codes@gmail.com)
118127
- [GitHub Issues](https://github.com/DCODE-HQ/DCODE-platform/issues)
119128

120129
---

src/components/layout/NavBar/NavBar.jsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ export default function NavBar() {
8484
))}
8585
<motion.div
8686
initial={{ opacity: 0, y: 10 }}
87-
animate={{ opacity: isCheckingAuth ? 0 : 1, y: 0 }}
87+
animate={{ opacity: 1, y: 0 }}
8888
transition={{ duration: 0.5, delay: 0.2 }}
8989
>
9090
<Button variant="outline">
9191
<a
92-
href={isLoggedIn ? `/dashboard` : `/auth`}
92+
href={isCheckingAuth ? '#' : (isLoggedIn ? `/dashboard` : `/auth`)}
93+
onClick={isCheckingAuth ? (e) => e.preventDefault() : undefined}
9394
>
94-
{isLoggedIn ? "Dashboard" : "Login"}
95+
{isCheckingAuth ? "Loading..." : (isLoggedIn ? "Dashboard" : "Login")}
9596
</a>
9697
</Button>
9798
</motion.div>
@@ -123,10 +124,11 @@ export default function NavBar() {
123124
<div className="pt-2">
124125
<Button variant="outline" className={"w-full"}>
125126
<a
126-
href={isLoggedIn ? `/dashboard` : `/auth`}
127-
className="px-[0.5rem] py-[3rem]"
127+
href={isCheckingAuth ? '#' : (isLoggedIn ? `/dashboard` : `/auth`)}
128+
onClick={isCheckingAuth ? (e) => e.preventDefault() : undefined}
129+
className={`px-[0.5rem] py-[3rem] ${isCheckingAuth ? "cursor-not-allowed opacity-70" : ""}`}
128130
>
129-
{isLoggedIn ? "Dashboard" : "Login"}
131+
{isCheckingAuth ? "Loading..." : (isLoggedIn ? "Dashboard" : "Login")}
130132
</a>
131133
</Button>
132134
</div>

src/pages/Dashboard/Dashboard.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export default () => {
346346
{
347347
icon: <FiGitMerge className="w-5 h-5 text-[#BCDD19]" />,
348348
title: "30 PRs Merged",
349-
progress: `${stats.totalMergedPRs} / 30`,
349+
progress: `${Math.min(stats.totalMergedPRs, 30)} / 30`,
350350
percentage: Math.min((stats.totalMergedPRs / 30) * 100, 100),
351351
status: `${Math.min((stats.totalMergedPRs / 30) * 100, 100).toFixed(2)}%`,
352352
color: "[#BCDD19]",
@@ -358,7 +358,7 @@ export default () => {
358358
{
359359
icon: <FiCode className="w-5 h-5 text-orange-400" />,
360360
title: "5,000 Lines of Code",
361-
progress: `${stats.totalLOC.toLocaleString()} / 5,000`,
361+
progress: `${Math.min(stats.totalLOC, 5000).toLocaleString()} / 5,000`,
362362
percentage: Math.min((stats.totalLOC / 5000) * 100, 100),
363363
status: `${Math.min((stats.totalLOC / 5000) * 100, 100).toFixed(2)}%`,
364364
color: "orange-400",
@@ -370,7 +370,7 @@ export default () => {
370370
{
371371
icon: <FiFolder className="w-5 h-5 text-blue-400" />,
372372
title: "30 Unique Repositories",
373-
progress: `${stats.projectCount} / 30`,
373+
progress: `${Math.min(stats.projectCount, 30)} / 30`,
374374
percentage: Math.min((stats.projectCount / 30) * 100, 100),
375375
status: `${Math.min((stats.projectCount / 30) * 100, 100).toFixed(2)}%`,
376376
color: "blue-400",
@@ -382,7 +382,7 @@ export default () => {
382382
{
383383
icon: <FiTarget className="w-5 h-5 text-purple-400" />,
384384
title: "50 Open PRs",
385-
progress: `${stats.totalOpenPRs} / 50`,
385+
progress: `${Math.min(stats.totalOpenPRs, 50)} / 50`,
386386
percentage: Math.min((stats.totalOpenPRs / 50) * 100, 100),
387387
status: `${Math.min((stats.totalOpenPRs / 50) * 100, 100).toFixed(2)}%`,
388388
color: "purple-400",
@@ -394,7 +394,7 @@ export default () => {
394394
{
395395
icon: <FiCalendar className="w-5 h-5 text-teal-400" />,
396396
title: "100 Total Commits",
397-
progress: `${stats.totalCommits} / 100`,
397+
progress: `${Math.min(stats.totalCommits, 100)} / 100`,
398398
percentage: Math.min((stats.totalCommits / 100) * 100, 100),
399399
status: `${Math.min((stats.totalCommits / 100) * 100, 100).toFixed(2)}%`,
400400
color: "teal-400",
@@ -406,7 +406,7 @@ export default () => {
406406
{
407407
icon: <FiAward className="w-5 h-5 text-[#BCDD19]" />,
408408
title: "First Project",
409-
progress: `${stats.projectCount} / 1`,
409+
progress: `${Math.min(stats.projectCount, 1)} / 1`,
410410
percentage: stats.projectCount > 0 ? 100 : 0,
411411
status: `${stats.projectCount > 0 ? 100 : 0}%`,
412412
color: "[#BCDD19]",

src/pages/Profile/UserProfile.jsx

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -222,47 +222,39 @@ export default function UserProfile() {
222222
{user.name}'s <span className="text-[#C6FF3D]">Profile</span>
223223
</h1> */}
224224
<div>
225-
<motion.div
226-
initial={{ opacity: 0, x: -30 }}
227-
animate={{ opacity: 1, x: 0 }}
228-
transition={{ delay: 0.2, duration: 0.6 }}
229-
>
230-
<motion.h1
231-
className="text-xl sm:text-2xl font-bold text-white"
232-
initial={{ opacity: 0, y: 20 }}
233-
animate={{ opacity: 1, y: 0 }}
234-
transition={{ delay: 0.3, duration: 0.6 }}
235-
>
236-
Contributor Profile
237-
</motion.h1>
238-
<motion.p
239-
className="text-gray-400 text-sm md:text-base"
240-
initial={{ opacity: 0, y: 20 }}
241-
animate={{ opacity: 1, y: 0 }}
242-
transition={{ delay: 0.4, duration: 0.6 }}
243-
>
244-
Welcome back,{" "}
245-
<motion.span
246-
className="text-[#C6FF3D]"
247-
initial={{ opacity: 0, scale: 0.8 }}
248-
animate={{ opacity: 1, scale: 1 }}
249-
transition={{ delay: 0.5, duration: 0.3 }}
225+
<motion.div
226+
initial={{ opacity: 0, x: -30 }}
227+
animate={{ opacity: 1, x: 0 }}
228+
transition={{ delay: 0.2, duration: 0.6 }}
250229
>
251-
{user.name || "User"}!
252-
</motion.span>{" "}
253-
Here's your{" "}
254-
<motion.span
255-
className="text-[#C6FF3D]"
256-
initial={{ opacity: 0 }}
257-
animate={{ opacity: 1 }}
258-
transition={{ delay: 0.7, duration: 0.3 }}
259-
>
260-
Profile
261-
</motion.span>{" "}
262-
overview.
263-
</motion.p>
264-
</motion.div>
265-
</div>
230+
<motion.h1
231+
className="text-xl sm:text-2xl font-bold text-white"
232+
initial={{ opacity: 0, y: 20 }}
233+
animate={{ opacity: 1, y: 0 }}
234+
transition={{ delay: 0.3, duration: 0.6 }}
235+
>
236+
Contributor Profile
237+
</motion.h1>
238+
<motion.p
239+
className="text-gray-400 text-sm md:text-base"
240+
initial={{ opacity: 0, y: 20 }}
241+
animate={{ opacity: 1, y: 0 }}
242+
transition={{ delay: 0.4, duration: 0.6 }}
243+
>
244+
Welcome to{" "}
245+
<motion.span
246+
className="text-[#C6FF3D]"
247+
initial={{ opacity: 0, scale: 0.8 }}
248+
animate={{ opacity: 1, scale: 1 }}
249+
transition={{ delay: 0.5, duration: 0.3 }}
250+
>
251+
{user.name || "User"}
252+
</motion.span>{" "}
253+
{/* Here's your{" "} */}
254+
Profile overview.
255+
</motion.p>
256+
</motion.div>
257+
</div>
266258
</div>
267259
{/* Social Links */}
268260

0 commit comments

Comments
 (0)