Little rework
This commit is contained in:
@@ -4,18 +4,46 @@ Personal portfolio built with Next.js, React, TypeScript, and Tailwind CSS.
|
||||
|
||||
## What It Includes
|
||||
|
||||
- Hero section with typing intro
|
||||
- Work experience and skills sections
|
||||
- Uptime and activity panels
|
||||
- Project and mini-project showcases
|
||||
- Contact page and admin page
|
||||
- Hero dev-card, live-count stat, and work-experience timeline
|
||||
- Projects (served from our DB) with a `/projects` page and homepage teaser
|
||||
- Luna section, DB-driven affiliates, and the SHSF Code Activity graph
|
||||
- Admin CMS at `/admin` for projects, work experience, and affiliates
|
||||
|
||||
## Data layer
|
||||
|
||||
Content (projects, work experience, affiliates) lives in **Postgres** and is
|
||||
managed through Prisma + our own Next.js API routes:
|
||||
|
||||
- Public reads: `GET /api/projects`, `/api/experience`, `/api/affiliates`
|
||||
- Admin writes: `POST/PUT/DELETE /api/admin/{projects,experience,affiliates}/…`
|
||||
(cookie session issued by `POST /api/admin/login`)
|
||||
- `/api/profile-image` serves the avatar (cached in memory)
|
||||
- Only the **Code Activity** widget still uses the external SHSF API.
|
||||
|
||||
### Environment
|
||||
|
||||
Copy `.env.example` to `.env` and set:
|
||||
|
||||
| Var | Purpose |
|
||||
| --- | --- |
|
||||
| `DATABASE_URL` | Postgres connection string |
|
||||
| `ADMIN_PASSWORD` | Password for the `/admin` login |
|
||||
| `SESSION_SECRET` | Long random string used to sign the admin session cookie |
|
||||
| `PROFILE_IMAGE_URL` | (optional) override for the avatar source |
|
||||
|
||||
## Development
|
||||
|
||||
Install dependencies:
|
||||
Install dependencies and generate the Prisma client:
|
||||
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm prisma generate
|
||||
```
|
||||
|
||||
Apply the schema to your database:
|
||||
|
||||
```bash
|
||||
pnpm prisma migrate dev
|
||||
```
|
||||
|
||||
Run the development server:
|
||||
@@ -61,4 +89,6 @@ The app will be available on port `6756` via `docker-compose.yml`.
|
||||
## Notes
|
||||
|
||||
- `next.config.ts` uses `output: "standalone"` so the Docker image can ship a minimal runtime.
|
||||
- `pnpm build` runs `prisma generate` before `next build`.
|
||||
- The activity graph on the home page is loaded from a remote SVG source.
|
||||
- The container needs the same env vars (`DATABASE_URL`, `ADMIN_PASSWORD`, `SESSION_SECRET`) at runtime.
|
||||
|
||||
Reference in New Issue
Block a user