# solvway-customer-portal The customer-facing Tastefully Events web app, built with **Next.js**, **React**, **TypeScript**, and **Tailwind CSS**. It consumes `solvway-mobile-api` through a server-side BFF (route handlers under `app/api/**`) — see the Environment section below. > Originating repo: `wsgoon/Tastefully-NextJs` (design team's UI), integrated with the mobile-api and moved into this monorepo as `solvway-customer-portal`. ## Getting Started ### Prerequisites Make sure you have [Node.js](https://nodejs.org/) (v18+ recommended) and `pnpm` or `npm` installed. ### Installation To install dependencies: ```bash # If running as part of the monorepo workspace: pnpm install # If running as a standalone project: npm install # or pnpm install ``` ### Running the Development Server Start the development server on port `3002`: ```bash pnpm dev # or npm run dev ``` Open [http://localhost:3002](http://localhost:3002) with your browser to see the application. ### Building for Production To create an optimized production build: ```bash pnpm build # or npm run build ``` To run the production server locally: ```bash pnpm start # or npm run start ``` ### Linting To check for linting errors: ```bash pnpm lint # or npm run lint ``` ### Environment This app talks to `solvway-mobile-api` through a server-side BFF (route handlers under `app/api/**`). The mobile-api `api-key` is a server secret and must never reach the browser. Copy `.env.example` to `.env.local` and fill in: | Variable | Description | |----------|-------------| | `MOBILE_API_BASE_URL` | Base URL of `solvway-mobile-api` (dev: `https://tastefully-dev-mobile.containerverse.dev`). | | `MOBILE_API_KEY` | The "Mobile APP" api-key sent on every mobile-api request. **Server-only — never `NEXT_PUBLIC_*`.** | | `SESSION_COOKIE_NAME` | Name of the httpOnly cookie holding the member JWT (default `te_session`). | ### Testing Unit and route-handler tests run with [Vitest](https://vitest.dev): ```bash npm test # run once npm run test:watch ``` ## Project Structure - `app/` - Contains Next.js App Router pages, components, and layout styles. - `checkin/` - Check-in user flow. - `components/` - Shared components (e.g. Auth shell, cards, inputs). - `draw/` - Event drawing/giveaway layouts. - `events/` - Event dashboard & management. - `floorplan/` - Floor plan visualization. - `forgot-password/` - Password recovery flow. - `goodie-bag/` - Event goodie bag functionality. - `login/` - User authentication (Sign In). - `register/` - User registration and verification. - `settings/` - Profile and portal settings. - `stage/` - Stage / main event viewer. - `store/` - Event store / point redemption. - `public/` - Static assets (images, icons, fonts). - `tsconfig.json` - TypeScript configuration. - `next.config.ts` - Next.js configuration. - `tailwind.config.ts` - Tailwind CSS configuration.