feat : init Project

This commit is contained in:
Thibault Pouch
2026-02-27 10:15:40 +01:00
parent 4bfc10fd98
commit 992b4340bd
20 changed files with 5790 additions and 21 deletions

View File

@@ -1,32 +1,60 @@
# CrowMate Intranet
This folder contains the intranet section separated from the main website repository.
Internal staff portal for CrowMate Studio — Headless Hazard.
## Files Moved
## Quick Start
### Pages
- `src/pages/intranet/IntranetDashboard.tsx`
- `src/pages/intranet/IntranetBugs.tsx`
- `src/pages/intranet/IntranetFeed.tsx`
- `src/pages/intranet/IntranetEvents.tsx`
- `src/pages/intranet/IntranetUsers.tsx`
- `src/pages/intranet/IntranetModeration.tsx`
```bash
npm install
npm run dev
```
### Components
- `src/components/layout/IntranetLayout.tsx`
The intranet runs on **http://localhost:5174** (port 5174 to avoid conflicts with the public site on 5173).
## Next Steps
## Demo Accounts
To set up this as a separate repository:
| Account | Email | Role |
|---------|-------|------|
| Kestrel (Admin) | `kestrel@crowmate.dev` | dev + admin |
| Vesper (Staff) | `vesper@crowmate.dev` | com |
1. Initialize Git repository:
```bash
cd /home/norsys/Delivery/website-intranet
git init
```
Regular user accounts are blocked from intranet access.
2. Copy necessary configuration files from the main website (package.json, tsconfig, vite.config, etc.)
## Project Structure
3. Install dependencies and set up the project structure
```
src/
App.tsx # Router (login + intranet routes)
main.tsx # Entry point
index.css # Design tokens & global styles
contexts/
AuthContext.tsx # Auth state (staff-only login)
components/
layout/
IntranetLayout.tsx # Sidebar + main content layout
shared/
ProtectedRoute.tsx # Route guard (auth + staff check)
PageLoader.tsx # Loading spinner
pages/
LoginPage.tsx # Staff login page
intranet/
IntranetDashboard.tsx # Overview stats & nav tiles
IntranetBugs.tsx # Bug triage (filter, assign, notes)
IntranetFeed.tsx # Staff-only activity feed
IntranetEvents.tsx # Create/manage events & polls
IntranetUsers.tsx # User management (promote/ban)
IntranetModeration.tsx # Forum moderation (pin/lock/delete)
data/
mockData.ts # All mock data
types/
index.ts # TypeScript interfaces
utils/
format.ts # Date formatting helpers
```
4. Update imports and routing as needed for the standalone intranet application
## Scripts
- `npm run dev` — Start dev server
- `npm run build` — Type-check + production build
- `npm run lint` — Run ESLint
- `npm run preview` — Preview production build