Penni Web is the Next.js frontend for Penni. It uses Clerk for web auth and talks to the separate Penni backend API for data and business logic.
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS 4
- UI Components: Radix UI + shadcn/ui
- State Management: TanStack Query (React Query)
- Forms: React Hook Form + Zod
- Authentication: Clerk
- Backend: Penni backend API
- Theming: next-themes (Dark Mode)
- Language: TypeScript
- Package Manager: npm
- Linting: ESLint with Next.js config
- Formatting: Prettier with Tailwind CSS plugin
- Node.js 20+
- Penni backend running locally or remotely
- Docker + Docker Compose if you want to run the frontend in a container
- npm or yarn
- Clone the repository:
git clone https://github.com/beefysalad/nexion.git
cd nexion- Install dependencies:
npm install- Set up environment variables:
cp .env.example .env.local- Configure your API base URL and Clerk keys in
.env.local:
NEXT_PUBLIC_API_BASE_URL="http://localhost:3000/api"
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
CLERK_SECRET_KEY="sk_test_..."
Start the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
- Copy the example environment file:
cp .env.example .env- Start the frontend container:
docker compose up --build- Open http://localhost:3000.
For hot reload while editing files locally, use the development Compose file instead:
docker compose -f docker-compose.dev.yml up --buildThis mounts your workspace into the container, runs Next.js in development mode, and watches for file changes.
├── app/ # Next.js app router pages and layouts
├── components/ # Reusable React components
│ ├── auth/ # Authentication components
│ ├── dashboard/ # Dashboard components
│ └── ui/ # shadcn/ui primitives
├── hooks/ # Custom React hooks
├── lib/ # Utility functions and configurations
│ └── routes.ts # Route definitions and protection rules
├── public/ # Static assets
├── proxy.ts # Clerk-powered route protection
└── components.json # shadcn/ui configuration
This project uses Clerk for authentication.
- Providers: Google OAuth + Clerk email/password
- Protection: Clerk middleware in
proxy.ts - Session Management:
ClerkProviderinRootLayout - User Sync: Clerk users are mirrored into Prisma and merged by email when appropriate
Routes are defined in lib/routes.ts:
publicRoutes: Accessible without login.authRoutes: Redirect to dashboard if already logged in.protectedRoutes: All other routes require authentication.
The project uses Tailwind CSS for styling with shadcn/ui components. Components are configured in components.json.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Run Prettier to format codenpm run format:check- Check code formatting with Prettier
The easiest way to deploy is using Vercel:
- Connect your GitHub repository
- Configure environment variables
- Deploy
Ensure your environment variables are properly configured and run:
npm run build
npm run startFeel free to submit issues and enhancement requests!
Created by John Patrick Ryan Mandal
This project is licensed under the MIT License.