A monorepo for CoderPush internal apps and packages, powered by Turborepo and Next.js. All code is written in TypeScript.
internal/
├── apps/
│ └── leave-requests/ # Next.js app for leave requests
│ ├── app/
│ │ ├── page.tsx
│ │ ├── dashboard/
│ │ │ └── layout.tsx
│ │ └── auth/
│ │ └── login/
│ ├── components/
│ │ ├── layout/
│ │ │ └── top-navbar.tsx
│ │ ├── user-dropdown-menu.tsx
│ │ └── auth-button.tsx
│ ├── lib/
│ │ └── utils.ts
│ ├── components.json
│ └── package.json
├── packages/
│ ├── ui/ # Shared React UI component library (shadcn/ui, Tailwind CSS)
│ │ ├── src/components/
│ │ │ └── button.tsx
│ │ ├── src/styles/globals.css
│ │ ├── hooks
│ │ ├── lib
│ │ └── package.json
│ ├── supabase/ # Supabase client/server utilities
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── client.ts
│ │ │ ├── server.ts
│ │ │ ├── auth.ts # Authentication utilities
│ │ │ └── middleware.ts
│ │ └── package.json
│ ├── eslint-config/ # Shared ESLint config
│ └── typescript-config/ # Shared TypeScript config
├── package.json
├── turbo.json
└── ...
- leave-requests: Next.js app for managing leave requests
- ui: Shared React component library (shadcn/ui, Tailwind CSS)
- supabase: Supabase client/server utilities with authentication helpers
- @workspace/eslint-config: Shared ESLint config
- @workspace/typescript-config: Shared TypeScript config
git clone <repository-url>
cd internal
pnpm install
For the leave-requests
app:
cd apps/leave-requests
cp .env.example .env
Set up google login via supabase
cd apps/leave-request/supabase
Edit .env
with your Supabase configuration:
SUPABASE_AUTH_GOOGLE_CLIENT_ID=your_google_client_id
SUPABASE_AUTH_GOOGLE_SECRET=your_google_secret
Prerequisite: Supabase CLI version >= 2.30.4 to support hooks
supabase start
From the monorepo root:
cd ..
turbo dev
- Shared UI components are in
packages/ui/src/components
. - To add components to your project, run the add command in the path of your app
cd apps/leave-requests
pnpm dlx shadcn@latest add <component>
- Import components in your app like this:
import { Button } from "@workspace/ui/components/button"
- Tailwind CSS is preconfigured. Styles are shared via
packages/ui/src/styles/globals.css
.
- Use the Supabase client/server utilities in your apps:
import { createServerClient } from "@workspace/supabase"
import { createBrowserClient } from "@workspace/supabase"
- All packages and apps use TypeScript.
- You can consume
@workspace/ui
directly from source without building. - The
@workspace/supabase
package builds compiled code into thedist
directory. Apps should always import from@workspace/supabase
, not fromdist
directly. - For more details, see each package/app's README or documentation.