Skip to content

feat: add standalone pronote ui demo - #3

Merged
Linoux-re merged 1 commit into
mainfrom
codex/build-comprehensive-web-application-ah2113
Sep 30, 2025
Merged

feat: add standalone pronote ui demo#3
Linoux-re merged 1 commit into
mainfrom
codex/build-comprehensive-web-application-ah2113

Conversation

@Linoux-re

Copy link
Copy Markdown
Owner

Summary

  • add a standalone HTML/CSS/JS Pronote-style UI with responsive layout, dark mode, and accessibility helpers
  • implement modular scripts for authentication, timetable, homework, grades, messaging, and documents using local mock data
  • include shared styles, icons, and mock JSON fixtures with documentation for running the static demo

Testing

  • not run

https://chatgpt.com/codex/tasks/task_e_68dc28a98ffc83298dc7428b4c2d8710

@Linoux-re
Linoux-re merged commit b6d3bde into main Sep 30, 2025
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +10 to +16
const onSubmit = async (event: FormEvent) => {
event.preventDefault();
const res = await fetch('http://localhost:4000/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password }),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Respect environment config in login API call

The login page posts credentials to http://localhost:4000/auth/login directly. This works only when the API is reachable on the developer’s machine at that exact host and port. The rest of the web app already uses an API_URL env variable, so deployments where the backend is on another domain/port (Docker, staging, production) will fail to authenticate. Consider reading the same API_URL env value as dashboard/page.tsx or a NEXT_PUBLIC_* variable instead of hard‑coding the URL.

Useful? React with 👍 / 👎.

Comment on lines +1 to +13
import { Controller, Get, Query, UseGuards } from '@nestjs/common';
import { DashboardService } from './dashboard.service';
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';

@Controller('dashboard')
@UseGuards(JwtAuthGuard)
export class DashboardController {
constructor(private readonly dashboardService: DashboardService) {}

@Get()
getDashboard(@Query('role') role = 'ELEVE') {
return this.dashboardService.getDashboardForRole(role);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Dashboard role is taken from user input instead of token

The dashboard endpoint accepts a role query parameter and forwards it directly to DashboardService.getDashboardForRole while the guard only checks that an Authorization header exists. Any caller can therefore request ?role=ADMIN to obtain privileged widgets regardless of their authenticated role. This effectively bypasses the role‑based access control and will leak data once real dashboard content is wired up. The controller should derive the role from the authenticated user (e.g. request.user.role) and/or enforce a RolesGuard instead of trusting a query parameter.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant