Monorepo for the Pasuruan Dev platform, managed with Turborepo and Bun.
| Name | ||
|---|---|---|
| Rahmat Ramadhan Putra | rahmatrdn.dev@gmail.com | https://www.linkedin.com/in/rahmatrdn/ |
| Service / Package | Path | Tech Stack | Port | Description |
|---|---|---|---|---|
| Web | apps/web |
Next.js, React, Tailwind CSS | 3010 |
Main public web application |
| API | apps/api |
Elysia, Bun, Drizzle ORM, Better Auth | 3011 |
Backend API server & authentication |
| Portal Admin | apps/portal-admin |
Laravel, Blade, Vite | 8000 |
Admin management portal |
Make sure the following tools are installed and available on your machine before setting up the project:
- Bun (
1.4.3or later) - MySQL (running locally on port
3306, or accessible via network) - PHP (
>= 8.2) and Composer (required forapps/portal-admin)
Install JavaScript/TypeScript workspace dependencies from the repository root:
bun installInstall PHP dependencies for apps/portal-admin:
cd apps/portal-admin
composer install
cd ../..Make sure your MySQL server is running, then create a database named pasdev_db:
CREATE DATABASE IF NOT EXISTS pasdev_db;Copy .env.example to .env in each service and update the values for your local environment:
cp apps/api/.env.example apps/api/.env
cp apps/web/.env.example apps/web/.env
cp apps/portal-admin/.env.example apps/portal-admin/.envKey settings to verify in each .env:
apps/api/.env- Set
DATABASE_URLto point topasdev_db(e.g.,mysql://root:root@localhost:3306/pasdev_db). - Set
BETTER_AUTH_SECRET(generate withopenssl rand -base64 32). - Set
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETif testing Google OAuth sign-in.
- Set
apps/web/.env- Verify
NEXT_PUBLIC_API_URL=http://localhost:3011andNEXT_PUBLIC_SITE_URL=http://localhost:3010.
- Verify
apps/portal-admin/.env-
Set
DB_DATABASE=pasdev_dbalong with yourDB_USERNAMEandDB_PASSWORD. -
Generate the Laravel application key:
cd apps/portal-admin php artisan key:generate cd ../..
-
Run the Drizzle migrations for apps/api:
cd apps/api
bun run db:migrate
cd ../..Note: You do not need to run migrations for the Laravel app (
apps/portal-admin); the database schema is managed byapps/api.
Start all apps in development mode from the repository root:
bun run devOnce running, the services are available at:
- Web: http://localhost:3010
- API: http://localhost:3011
- Portal Admin: http://localhost:8000
Run from the repository root:
bun run build # Build all apps and packages
bun run lint # Run linters across the workspace
bun run format # Format code across the workspace
bun run typecheck # Run TypeScript type checking