-
Install dependencies
Make sure you have pnpm installed.pnpm install
-
Environment file
Create a .env file in the project root: -
Update Proxy URL
Invite.config.ts, update thetargetto point to your backend API:proxy: { "/api": { target: "https://api.example.com/api/v2", changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), cookieDomainRewrite: "localhost", headers: proxyHeaders, }, },
- User roles (student, company, coordinator) are managed in route files (e.g.,
routes/_company/route.tsx). - Each route checks authentication and role before rendering content.
- Unauthorized access triggers a redirect.
- Deep linking is prevented by route guards in
route.tsxfiles. - If a user is not authenticated, they are redirected to
/login. - After login, users are redirected back to the page they originally tried to access.
- Start the dev server:
pnpm run dev
- The app uses Vite for fast development and hot reloading.
- components: UI components.
- hooks: Custom hooks and form logic.
- lib: Utilities and proxy client.
- routes: Route definitions and guards.
- store: State management for authentication.
- types: Zod schemas and TypeScript types.
TypeScript: Type-safe JavaScript for scalable development.
React: Component-based UI library.
ShadCN: Prebuilt UI components for fast development.
Tailwind CSS: Utility-first CSS framework for custom styling.
Chart.js: Flexible JavaScript charting library for data visualization.
TanStack Router: Handles navigation and route protection.
TanStack Query: Efficient data fetching and caching.
TanStack Form: Form state and validation management.
Zod: Type-safe schema validation for forms and API data.
Zustand: Lightweight state management for Authentication and saving to local storage.
Prettier: Code formatting for consistent style.