This commit is contained in:
51
README.md
51
README.md
@@ -1,36 +1,47 @@
|
||||
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
||||
# Akshay Kolli Personal Site
|
||||
|
||||
## Getting Started
|
||||
Next.js personal site with MDX writing, a resume page, and local-first visit analytics for a Raspberry Pi deployment.
|
||||
|
||||
First, run the development server:
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
# or
|
||||
bun dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
||||
## Environment
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
||||
```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
|
||||
```
|
||||
|
||||
## Learn More
|
||||
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.
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
## Docker
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
```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
|
||||
```
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
||||
`/server_storage` should be owned by the container user and should not be world-readable because it contains analytics data.
|
||||
|
||||
## Deploy on Vercel
|
||||
## Checks
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
||||
```bash
|
||||
npm run lint
|
||||
npm run build
|
||||
npm audit --omit=dev
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user