Compare commits
4 Commits
dependabot
...
28d1f78e18
| Author | SHA1 | Date | |
|---|---|---|---|
| 28d1f78e18 | |||
| 7433052878 | |||
| b6fcc63c82 | |||
| 1648a56680 |
0
.env.example
Normal file
0
.env.example
Normal file
51
README.md
51
README.md
@@ -1,31 +1,28 @@
|
|||||||
# shadcn/ui monorepo template
|
# NextPlacement
|
||||||
|
|
||||||
This template is for creating a monorepo with shadcn/ui.
|
NextPlacement is a placement-management platform built as a monorepo (pnpm workspaces + Turborepo) with multiple apps and shared packages.
|
||||||
|
|
||||||
## Usage
|
## Repository Layout
|
||||||
|
- `apps/` - application(s) (e.g., student/admin web apps)
|
||||||
|
|
||||||
|
- `packages/` - reusable packages/libraries used by apps
|
||||||
|
|
||||||
|
- `shared/` - sared code/assets (project-specific)
|
||||||
|
|
||||||
|
- `docker-compose.yml` / `docker-compose.dev.yml` - Docker compose configurations
|
||||||
|
|
||||||
|
- `DOCKER.md` - Docker notes / commands
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
- Git
|
||||||
|
- Node.js (LTS recommended)
|
||||||
|
- pnpm
|
||||||
|
- Docker Desktop (recommended for easiest setup)
|
||||||
|
|
||||||
|
## Quick Start (Docker)
|
||||||
|
1. Create environment file:
|
||||||
|
- Create `.env` in the project root (or copy from `.env.example` if present)
|
||||||
|
|
||||||
|
2.Start containers:
|
||||||
```bash
|
```bash
|
||||||
pnpm dlx shadcn@latest init
|
docker-compose up --build
|
||||||
```
|
|
||||||
|
|
||||||
## Adding components
|
|
||||||
|
|
||||||
To add components to your app, run the following command at the root of your `web` app:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm dlx shadcn@latest add button -c apps/web
|
|
||||||
```
|
|
||||||
|
|
||||||
This will place the ui components in the `packages/ui/src/components` directory.
|
|
||||||
|
|
||||||
## Tailwind
|
|
||||||
|
|
||||||
Your `tailwind.config.ts` and `globals.css` are already set up to use the components from the `ui` package.
|
|
||||||
|
|
||||||
## Using components
|
|
||||||
|
|
||||||
To use the components in your app, import them from the `ui` package.
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
import { Button } from '@workspace/ui/components/button';
|
|
||||||
```
|
|
||||||
|
|||||||
2
apps/admin/.env.example
Normal file
2
apps/admin/.env.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/nextplacement
|
||||||
|
AUTH_SECRET=change_me
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9001",
|
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9001",
|
||||||
"build": "dotenv -e ../../.env -- next build",
|
"build": "dotenv -e ../../.env -- next build && cp -r .next/static .next/standalone/apps/admin/.next/static && cp -r public .next/standalone/apps/admin/public",
|
||||||
"start": "dotenv -e ../../.env -- next start -p 9001",
|
"start": "PORT=9001 dotenv -e ../../.env -- node .next/standalone/apps/admin/server.js",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"lint:fix": "next lint --fix",
|
"lint:fix": "next lint --fix",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
3
apps/student/.env.example
Normal file
3
apps/student/.env.example
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ADMIN_DOMAIN=http://localhost:9001
|
||||||
|
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/nextplacement
|
||||||
|
AUTH_SECRET=change_me
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9000",
|
"dev": "dotenv -e ../../.env -- next dev --turbopack -p 9000",
|
||||||
"build": "dotenv -e ../../.env -- next build",
|
"build": "dotenv -e ../../.env -- next build && cp -r .next/static .next/standalone/apps/student/.next/static && cp -r public .next/standalone/apps/student/public",
|
||||||
"start": "dotenv -e ../../.env -- next start -p 9000",
|
"start": "PORT=9000 dotenv -e ../../.env -- node .next/standalone/apps/student/server.js",
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"lint:fix": "next lint --fix",
|
"lint:fix": "next lint --fix",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
|||||||
@@ -34,6 +34,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nodemailer": "^7.0.7"
|
"nodemailer": "^7.0.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -9,8 +9,8 @@ importers:
|
|||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
nodemailer:
|
nodemailer:
|
||||||
specifier: ^7.0.7
|
specifier: ^7.0.6
|
||||||
version: 7.0.7
|
version: 7.0.6
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@eslint/js':
|
'@eslint/js':
|
||||||
specifier: ^9.32.0
|
specifier: ^9.32.0
|
||||||
@@ -3269,8 +3269,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==}
|
resolution: {integrity: sha512-Z+iLaBGVaSjbIzQ4pX6XV41HrooLsQ10ZWPUehGmuantvzWoDVBnmsdUcOIDM1t+yPor5pDhVlDESgOMEGxhHA==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
|
|
||||||
nodemailer@7.0.7:
|
nodemailer@7.0.6:
|
||||||
resolution: {integrity: sha512-jGOaRznodf62TVzdyhKt/f1Q/c3kYynk8629sgJHpRzGZj01ezbgMMWJSAjHADcwTKxco3B68/R+KHJY2T5BaA==}
|
resolution: {integrity: sha512-F44uVzgwo49xboqbFgBGkRaiMgtoBrBEWCVincJPK9+S9Adkzt/wXCLKbf7dxucmxfTI5gHGB+bEmdyzN6QKjw==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
|
|
||||||
npm-run-path@4.0.1:
|
npm-run-path@4.0.1:
|
||||||
@@ -7271,7 +7271,7 @@ snapshots:
|
|||||||
|
|
||||||
nodemailer@6.10.1: {}
|
nodemailer@6.10.1: {}
|
||||||
|
|
||||||
nodemailer@7.0.7: {}
|
nodemailer@7.0.6: {}
|
||||||
|
|
||||||
npm-run-path@4.0.1:
|
npm-run-path@4.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user