This workspace contains the main frontend web application, built using the Next.js framework.
This is the user-facing application. It integrates various shared packages and services from the monorepo to provide the application's features and user interface.
As a Next.js application using the App Router, it follows standard conventions:
app/: Contains the application routes, pages, layouts, and components.- Utilizes Server Components and Client Components.
app/api/: Contains Next.js API Route Handlers specific to this frontend application.components/: Shared components specific to this application (complementing@op/ui).lib/orutils/: Utility functions specific to this application.hooks/: Custom hooks specific to this application (complementing@op/hooks).store/: Contains state management logic, using Zustand.public/: Static assets like images and fonts.styles/: Global styles or SCSS files.next.config.js: Next.js configuration.postcss.config.ts: Configuration for PostCSS and Tailwind CSS.
- Next.js: React framework for building the frontend (App Router or Pages Router).
- React: UI library.
- TypeScript: For static typing.
@op/ui: Consumes the shared UI component library.@op/hooks: Uses shared React hooks for logic and data fetching.@op/trpc: Integrates the tRPC client (TRPCProvider.tsx) to communicate with the backend API hosted byapps/api.@op/supabase: Uses the client-side Supabase client for authentication and potentially other direct Supabase interactions.- Tailwind CSS: Utility-first CSS framework for styling.
- Zustand: Client-side state management library.
- Sonner: Library for displaying toasts/notifications.
- Immer: Utility for working with immutable state (often used with Zustand).
babel-plugin-react-compiler: Experimental React compiler (Memoization).@next/bundle-analyzer: Tool for analyzing the webpack bundle size.
Depends On:
-
@op/core: For shared configuration or types. -
@op/hooks: Utilizes shared hooks. -
@op/supabase: Uses Supabase client utilities. -
@op/trpc: Imports the tRPC provider/client. -
@op/typescript-config(Dev): For TypeScript configuration. -
@op/ui: Renders UI components provided by this package. -
@op/styles: For tailwindcss config and base styles.
Depended On By:
- (None - this is a final application)
- Run
pnpm devto start the Next.js development server (on port 3100). - Run
pnpm typecheckto type-check the code. - Run
pnpm buildto create a production build. - Run
pnpm startto run the production build (on port 3100).
First, run the development server:
pnpm devOpen http://localhost:3100 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This application defines its own API routes within the app/api/ directory using Route Handlers. For example, a file at app/api/hello/route.ts would map to http://localhost:3100/api/hello.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.