# Fusero website revamp This is the revamp of the official Fusero website, this offers flexibility with new features compared to webflow. - ๐Ÿงฉ **React + TypeScript + Vite** (frontend) - โšก **Fastify + MikroORM + PostgreSQL** (backend) - โœ… **Vitest** (testing framework for both frontend and backend) --- ## ๐Ÿ“ Folder Structure ``` fusero-frontend/ โ”œโ”€โ”€ src/ # React frontend (Vite) โ”œโ”€โ”€ tests/ # Frontend unit/component tests โ”œโ”€โ”€ backend/ # Fastify backend lives here โ”‚ โ”œโ”€โ”€ src/ # Fastify app + MikroORM logic โ”‚ โ”œโ”€โ”€ entities/ # MikroORM entity definitions โ”‚ โ”œโ”€โ”€ tests/ # Backend unit/integration tests โ”‚ โ””โ”€โ”€ tsconfig.json # TypeScript config for backend โ”œโ”€โ”€ vite.config.ts # Vite config โ””โ”€โ”€ README.md ``` --- ## ๐Ÿ› ๏ธ Tech Stack ### Frontend | Tool | Purpose | | -------------------------- | ------------------------------- | | **React** | UI framework | | **TypeScript** | Type safety | | **Vite** | Fast dev server + build | | **Vitest** | Unit & component testing | | **React Testing Library** | Test components like real users | | **PrimeReact** | UI component library | | **PrimeIcons** | Icon set for PrimeReact | | **@tanstack/react-router** | Modern file-based routing | | **React Hook Form** | Form state management | | **Zod** | Schema validation | | **Zustand** | Global state management | | **Framer Motion** | Animations and transitions | | **Tailwind CSS** | Utility-first CSS styling | | **PostCSS** | Processes Tailwind and plugins | | **Autoprefixer** | Adds vendor prefixes to CSS | ### Backend | Tool | Purpose | | ---------------------- | -------------------------- | | **Fastify** | Lightweight backend server | | **TypeScript** | Type safety | | **MikroORM** | Database ORM | | **PostgreSQL** | SQL database | | **Vitest + Supertest** | HTTP & logic testing | --- ## ๐Ÿงช Testing Setup ### Frontend - Run tests: ```bash pnpm test ``` - Uses: - `vitest` for fast unit testing - `@testing-library/react` for testing UI components ### Backend - Run tests: ```bash cd backend pnpm test ``` - Uses: - `vitest` + `supertest` for testing Fastify routes and logic --- ## ๐Ÿš€ Getting Started ### 1. Install dependencies ```bash pnpm install cd backend && pnpm install ``` ### 2. Run frontend ```bash pnpm dev ``` ### 3. Run backend ```bash cd backend pnpm dev ``` --- ## ๐Ÿ“ฆ Deployment Frontend and backend can be deployed separately or behind a proxy (e.g. Nginx or Vercel + API routes). You can also Dockerize both services if needed. --- ## ๐Ÿ“š Environment Variables Set these in `.env` files: - **Frontend**: (optional) - **Backend**: ``` DATABASE_URL=postgresql://user:pass@localhost:5432/mydb ``` --- Let me know if you'd like a `.env.example`, CI config, or Docker setup.