2026-05-25 09:49:40 -04:00
# Akshay Kolli Personal Site
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
Next.js personal site with MDX writing, a resume page, and local-first visit analytics for a Raspberry Pi deployment.
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
## Development
2026-02-06 14:10:59 -05:00
```bash
2026-05-25 09:49:40 -04:00
npm install
2026-02-06 14:10:59 -05:00
npm run dev
```
Open [http://localhost:3000 ](http://localhost:3000 ) with your browser to see the result.
2026-05-25 09:49:40 -04:00
## Environment
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
```bash
ANALYTICS_SALT=replace-with-a-long-random-secret
VISIT_DB_PATH=/server_storage/visitors.db
ADMIN_DASH_URL=
ADMIN_DASH_KEY=
REQUEST_LOGS=false
```
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
Analytics does not use a browser-visible secret. The endpoint accepts same-origin JSON only, validates the path, rate-limits requests, and stores a daily HMAC visitor ID instead of raw IP addresses. Set `ANALYTICS_SALT` in production so visitor IDs remain stable across restarts without storing raw addresses.
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
## Docker
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
```bash
docker build -t personal-site:latest .
docker run -d \
--name website-container \
--restart unless-stopped \
-p 8080:3000 \
-e ANALYTICS_SALT="$(openssl rand -hex 32)" \
-v /server_storage:/server_storage \
personal-site:latest
```
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
`/server_storage` should be owned by the container user and should not be world-readable because it contains analytics data.
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
## Checks
2026-02-06 14:10:59 -05:00
2026-05-25 09:49:40 -04:00
```bash
npm run lint
npm run build
npm audit --omit=dev
```