Backend modules from tastefully 8bd93d15: core-libs, core-session, api-gateway, mobile-api, services-auth, services-system, services-counter, services-member, services-log, services-email. solvway-admin-portal from babyboo f64d096ea, solvway-customer-portal from tastefully 8bd93d15. Copied as tracked files only. Literal secrets replaced with environment placeholders: - services-email: SMTP_PASSWORD, MAILGUN_API_KEY, SENDGRID_API_KEY, MAILJET_API_KEY, MAILJET_SECRET_KEY (optional, empty default) - services-system: JUMIO_TOKEN, JUMIO_SECRET (optional) - services-auth: USER_AUTH_API_SECRET (required); commented JWT secret removed - core-libs: JWT_TOKEN default removed (required), XXL_JOB_TOKEN default removed, ipgeolocation key read from IPGEOLOCATION_API_KEY - services-system EkycAppConfig: commented Jumio credentials removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
107 lines
2.9 KiB
Markdown
107 lines
2.9 KiB
Markdown
# 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.
|