Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5a914d3
Set up frontend
ashyune Jan 15, 2026
ddfa5a8
ft: Setup iframes
ashyune Jan 15, 2026
6895d91
ft: added frontend setup
ashyune Jan 15, 2026
e8129e0
ft: added thumbnail and fixed game page
ashyune Jan 16, 2026
a738fe7
ft: iframes added to game page
ashyune Jan 16, 2026
f24b670
Merge branch 'acmpesuecc:frontend-setup' into frontend-setup
ashyune Jan 16, 2026
f45140c
Merge branch 'frontend-setup' of https://github.com/ashyune/ProgChamp…
ashyune Jan 16, 2026
7b4122c
implemented search bar, admin panel, game upload page and made them c…
zia0307 Jan 17, 2026
1b9f219
modified admin panel and upload functionality, resolved import issues
zia0307 Jan 17, 2026
b1e0b7d
modified +page.svelte
ashyune Jan 17, 2026
ee82a2e
fixed upload/+page.ts
ashyune Jan 17, 2026
2ac8133
ft: added fullscreen, handle loading & errors
ashyune Jan 17, 2026
62d1be7
error handling
ashyune Jan 17, 2026
60b6feb
reduced spacing around the title text
zia0307 Jan 17, 2026
00595f8
Added login buttons
ashyune Jan 17, 2026
cd58f9b
ft: updated login buttons
ashyune Jan 17, 2026
e19a3c3
ft: added profile dropdown, fixed some buttons
ashyune Jan 17, 2026
41a661f
ft: linked profile dropdown buttons
ashyune Jan 17, 2026
03658d4
created a my-games page to view submitted games
zia0307 Jan 19, 2026
c64595f
ft: implemented tag filters
ashyune Jan 19, 2026
936ebea
ft: added tag filters
ashyune Jan 20, 2026
e89b650
Updated README.md
ashyune Jan 20, 2026
58397a9
ft: added auth frontend
ashyune Jan 20, 2026
e8224d6
fix: temporarily fixed upload page
ashyune Jan 20, 2026
762332c
added superlikes and rating functionality
zia0307 Jan 20, 2026
a2c1205
fix: fixed filter tags
ashyune Jan 22, 2026
f3ce972
fix: moved header and footer into components
ashyune Jan 27, 2026
1cd763b
Add project structure to README.md
ashyune Feb 5, 2026
d50fc76
feat(ui): Redesign the home page of the website
Thisissandy07 Feb 27, 2026
e65167a
ft: basic frontend for upload games page
architaagr Feb 28, 2026
8d7ef0b
feat: UI for upload, all-games and my-games pages
architaagr Mar 1, 2026
5ce3d3a
fix(frontend home page) : svelte 4 to svelte 5 migration
Thisissandy07 Mar 2, 2026
57e80a4
fix(frontend UI) : update links to use '/all-games' instead of '/games'
Thisissandy07 Mar 2, 2026
457ec1f
feat(admin UI): add admin panel page
Thisissandy07 Mar 7, 2026
85986ec
feat(admin): add server-side data fetching
Thisissandy07 Mar 7, 2026
9c4ce52
fix(auth): reroute to backend authentication endpoint
Thisissandy07 Mar 7, 2026
8bd05eb
feat(nav): add admin panel link to main navigation
Thisissandy07 Mar 7, 2026
8007ef2
fix(auth) : handle unauthenticated session fallback in server hook
Thisissandy07 Mar 9, 2026
89b68d2
fix : define App.Locals types for user session and profile state
Thisissandy07 Mar 9, 2026
8fa3d5b
fix(server): setup CORS to API routes
Thisissandy07 Mar 9, 2026
a305242
feat: reactions backend (likes/dislikes) and dummy user entry
architaagr Mar 9, 2026
9ea546c
feat: add tags route (#16)
Pratham042006 Mar 9, 2026
6503c98
feat(frontend): UI for upload games, all games and my games pages
Thisissandy07 Mar 9, 2026
34240ed
fix(frontend) : Removing login requirement for now
Thisissandy07 Mar 9, 2026
dd22bd3
fix (admin) : removes admin req for admin page
Thisissandy07 Mar 9, 2026
2d5eba4
Merged #29 into frontend-setup
Thisissandy07 Mar 9, 2026
9fde489
feat: add game request, user request system and admin moderation (#18)
ayaanGH06 Mar 12, 2026
e978307
Merge branch 'dev' into frontend-setup
ashyune Mar 12, 2026
de23eed
fix: resolved 500 error by updating frontend/src/routes/+layout.serve…
zia0307 Mar 13, 2026
3563e5d
feat: add bun dev script to run frontend and backend in parallel
Thisissandy07 Mar 13, 2026
8a1c3cb
fix: frontend suggestions from copilot and added backend files
architaagr Mar 13, 2026
c31b487
Merge branch 'frontend-setup' of https://github.com/acmpesuecc/ProgCh…
architaagr Mar 13, 2026
c250a12
chore: remove url logs from dev script
Thisissandy07 Mar 14, 2026
ecd86a7
feat: extract all shared styles, tokens and resets into global.css
Thisissandy07 Mar 14, 2026
b56c237
feat: create components to be reused
Thisissandy07 Mar 14, 2026
6ceae5d
refactor: replace inline code with imported components, update /games…
Thisissandy07 Mar 14, 2026
1b12e09
fix: import globals.css, add font link and top padding to prevent nav…
Thisissandy07 Mar 14, 2026
f0395ba
feat: added svelte components to frontend and gameplay page
architaagr Mar 14, 2026
94258eb
ft:added dev-catalogue page
Ieatfingies Mar 14, 2026
6a5d0c1
Merge branch 'main' into poorna-dev-catalogue
Ieatfingies Mar 14, 2026
19c7373
feat: add developer catalog page
Ieatfingies Mar 15, 2026
e6d1c4f
Merge branch 'poorna-dev-catalogue' of https://github.com/Ieatfingies…
Ieatfingies Mar 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AIEP_Resources/Weekly_Reports/week0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This week, I focused on mastering the Turso and Drizzle integration,
specifically analyzing how we handle relational logic like Many-to-Many mappings and staging workflows.
I also developed the technical presentation slides to explain our data layer and core architecture.

Next week, I plan to explore the rest of our stack—including SvelteKit, Hono, and Cloudflare Workers—so
we can officially begin active development on the project.
1 change: 1 addition & 0 deletions ProgChamp
Submodule ProgChamp added at e97830
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,78 @@ _This project is part of ACMPESUECC - AIEP'26._
- [Mebin Thattil](https://github.com/mebinthattil)

**Mentees:**
- [Archita Agrawal](https://github.com/architaagr)
- [Pratham Mudakavi](https://github.com/Pratham042006)
- [Poornaprajna Kashyap](https://github.com/leatfingies)
- [Syed Ayaan Hasan](https://github.com/ayaanGH06)
- [Sannidhi Nayak](https://github.com/Thisissandy07)

<hr>

# Frontend
## Project Structure
```
frontend/
├── src/
│ ├── lib/
│ │ ├── components/
│ │ │ ├── layout/
│ │ │ │ └── ui/
│ │ │ │ ├── Button.svelte
│ │ │ │ ├── Card.svelte
│ │ │ ├── Footer.svelte
│ │ │ ├── Header.svelte
│ │ └── GameCard.svelte
│ │ ├── data/
│ │ │ └── games.js
│ │ ├── services/
│ │ │ └── api.js
│ │ ├── stores/
│ │ │ ├── ratings.ts
│ │ │ ├── submissions.ts
│ │ │ └── user.js
│ │ ├── styles/
│ │ │ └── globals.css
│ │ └── index.ts
│ │
│ ├── routes/
│ │ ├── admin/
│ │ │ ├── +page.svelte
│ │ │ └── +page.ts
│ │ ├── game/
│ │ │ └── [id]/
│ │ │ ├── +page.svelte
│ │ │ └── +page.ts
│ │ ├── my-games/
│ │ │ └── +page.svelte
│ │ ├── upload/
│ │ │ ├── +page.svelte
│ │ │ └── +page.ts
│ │ ├── +layout.server.ts
│ │ ├── +layout.svelte
│ │ └── +page.svelte
│ │
│ ├── app.css
│ ├── app.d.ts
│ ├── app.html
│ ├── auth.ts
│ └── hooks.server.ts
├── static/
│ ├── games/
│ └── favicon.svg
├── .gitignore
├── .npmrc
├── LICENSE
├── README.md
├── package.json
├── package-lock.json
├── svelte.config.js
├── tsconfig.json
└── vite.config.ts
```

- [Archita Agrawal]()
- [Pratham Mudakavi](https://github.com/Pratham042006)
- [Poornaprajna Kashyap](https://github.com/leatfingies)
Expand Down
35 changes: 35 additions & 0 deletions backend/src/db/seed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { db } from "./index";
import { users, games } from "./schema";

async function seed() {
try {
// Dummy user
await db.insert(users).values({
id: "user1",
googleId: "dummy-google-id-user1",
email: "user1@test.com",
name: "Test User",
avatarUrl: "https://example.com/avatar.png",
userType: "normal",
superlikesRemaining: 3,
isActive: true,
}).onConflictDoNothing();

// Dummy game
await db.insert(games).values({
id: "game123",
title: "Dummy Game",
description: "Test game for reactions",
gameUrl: "https://example.com/game",
createdBy: "user1",
}).onConflictDoNothing();

console.log("Seed data inserted successfully");
} catch (err) {
console.error("Seed failed:", err);
} finally {
process.exit(0);
}
}

seed();
15 changes: 14 additions & 1 deletion backend/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Hono } from "hono";
import { cors } from "hono/cors";

import auth from "./routes/auth";
import profile from "./routes/profile";
import gameRequests from "./routes/gameRequests";
import userRequests from "./routes/userRequests";
import adminGameRequests from "./routes/adminGameRoutes";
import tagsRoute from './routes/tags';
import reactions from "./routes/reactions";

const app = new Hono();

Expand All @@ -12,13 +18,20 @@ app.use(
origin: process.env.FRONTEND_URL || "http://localhost:3000",
credentials: true,
allowMethods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
allowHeaders: ["Content-Type", "Authorization"],
allowHeaders: ["Content-Type", "Authorization", "X-User-Id"],
}),
);

app.get("/", (c) => c.text("OK"));

app.route("/auth", auth);
app.route("/profile", profile);
app.route("/game-requests", gameRequests); // Accessible at /game-requests
app.route("/user-requests", userRequests); // Accessible at /user-requests
app.route("/admin/game-requests", adminGameRequests); // Accessible at /admin/game-requests
app.route("/games", reactions)
app.route("/tags", tagsRoute);


export default app;

Expand Down
13 changes: 13 additions & 0 deletions backend/src/lib/errors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export class NotFoundError extends Error {
constructor(message: string) {
super(message);
this.name = "NotFoundError";
}
}

export class InvalidStateError extends Error {
constructor(message: string) {
super(message);
this.name = "InvalidStateError";
}
}
80 changes: 80 additions & 0 deletions backend/src/lib/gameRequestService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { db } from "../db/index";
import { NotFoundError, InvalidStateError } from "../lib/errors";
import { gameRequests, games, adminActions } from "../db/schema";
import { eq, and, count } from "drizzle-orm";
import { nanoid } from "nanoid";

export async function getPendingGameRequest(id: string) {
const request = await db.query.gameRequests.findFirst({
where : eq (gameRequests.id, id)
})

if (!request) {
throw new NotFoundError(`Game request not found `);
}
if (request.status !== "pending") {
throw new InvalidStateError(`Invalid request status `);
}

return request

}

export async function approveGameRequest(id: string, adminId: string) {
await db.transaction(async (tx) => {

const request = await tx.query.gameRequests.findFirst({
where: eq(gameRequests.id, id),
});

if (!request) {
throw new NotFoundError("Game request not found");
}

if (request.status !== "pending") {
throw new InvalidStateError("Invalid request status");
}

const gameId = `game_${nanoid(16)}`;

await tx.insert(games).values({
id: gameId,
title: request.title,
description: request.description,
gameUrl: request.gameUrl,
createdBy: request.submittedBy,
});

await tx.update(gameRequests)
.set({
status: "approved",
reviewedBy: adminId,
reviewedAt: new Date(),
})
.where(eq(gameRequests.id, id));

await tx.insert(adminActions).values({
id: `aa_${nanoid(16)}`,
adminId: adminId,
gameRequestId: id,
});

});
}


export async function canUserSubmitNewGame(userId: string): Promise<boolean> {
const [result] = await db
.select({ value: count() })
.from(gameRequests)
.where(
and(
eq(gameRequests.submittedBy, userId),
eq(gameRequests.requestType, "new_game"),
eq(gameRequests.status, "pending")
)
);

const pendingCount = result?.value ?? 0;
return pendingCount < 3;
}
21 changes: 21 additions & 0 deletions backend/src/lib/gameService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { db } from "../db/index";
import { NotFoundError, InvalidStateError } from "../lib/errors";
import { games } from "../db/schema"
import { eq } from "drizzle-orm";

export async function getGame(id: string) {
const game = await db.query.games.findFirst({
where : eq (games.id, id)
})

if (!game) {
throw new NotFoundError(`Game not found `);
}
if (!game.isActive) {
throw new InvalidStateError(`Game is deactivated `);
}

return game

}

Loading