You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
3
+
Frontend for the ACM @ UIUC event RSVP system. Built with React, TypeScript, Vite, and Mantine UI.
4
4
5
-
Currently, two official plugins are available:
5
+
## Stack
6
6
7
-
-[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
-
-[@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
7
+
-**React 19** + **TypeScript**
8
+
-**Vite** — dev server and bundler
9
+
-**Mantine v8** — UI components and notifications
10
+
-**`@acm-uiuc/core-client`** — typed SDK for the Core API
11
+
-**`@azure/msal-react`** — Microsoft SSO authentication
12
+
-**Cloudflare Turnstile** — bot protection on RSVP/cancel/profile actions
13
+
-**React Router v7** — client-side routing
9
14
10
-
## React Compiler
15
+
## Getting Started
11
16
12
-
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
-
14
-
## Expanding the ESLint configuration
17
+
```bash
18
+
yarn install
19
+
yarn dev # local-dev (points to QA API)
20
+
yarn dev:qa # dev build against QA API
21
+
```
15
22
16
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
23
+
## Build
17
24
18
-
```js
19
-
exportdefaultdefineConfig([
20
-
globalIgnores(['dist']),
21
-
{
22
-
files: ['**/*.{ts,tsx}'],
23
-
extends: [
24
-
// Other configs...
25
+
```bash
26
+
yarn build # production build
27
+
yarn build:dev # dev environment build
28
+
yarn build:prod # production environment build
29
+
yarn typecheck # type-check without emitting
30
+
```
25
31
26
-
// Remove tseslint.configs.recommended and replace with this
Configured in `src/config.ts` via `VITE_RUN_ENVIRONMENT`:
45
35
46
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
│ ├── EventsContext/ # Fetches all events on mount; useEvents()
52
+
│ ├── ProfileContext/ # Fetches RSVP profile after auth; useProfile()
53
+
│ ├── RsvpsContext/ # Fetches user RSVPs, enriches with event data; useRsvps()
54
+
│ ├── Layout/ # MainLayout shell
55
+
│ └── Logo/
56
+
├── pages/
57
+
│ ├── events/ # Upcoming events list + RSVP flow
58
+
│ ├── rsvps/ # My RSVPs (view, cancel)
59
+
│ ├── profile/ # RSVP profile create/edit
60
+
│ └── Home.page.tsx # Dashboard
61
+
└── App.tsx / Router.tsx / main.tsx
62
+
```
63
+
64
+
## Architecture Notes
65
+
66
+
-**Context-based caching** — `EventsContext`, `ProfileContext`, and `RsvpsContext` each fetch once and expose a `refetch()` for manual refresh. Provider order in `main.tsx`: `Auth → Events → Profile → RSVPs`.
67
+
-**SDK usage** — all API calls go through `@acm-uiuc/core-client`. Auth tokens (`xUiucToken`) and Turnstile tokens (`xTurnstileResponse`) are passed as typed request parameters, not headers.
68
+
-**Empty-body responses** — RSVP POST and DELETE return 201/200 with empty bodies. Use the `Raw` SDK variant (`apiV1Rsvp...Raw`) and skip `.value()` to avoid JSON parse errors.
69
+
-**Error notifications** — all errors surface via `showApiErrorNotification()` (`src/common/utils/notifyError.tsx`) which shows a Mantine notification with the error title, message, optional request ID, and a mailto report link.
0 commit comments