# Akshay Kolli Personal Site Next.js personal site with MDX writing, a resume page, and local-first visit analytics for a Raspberry Pi deployment. ## Development ```bash npm install npm run dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. ## Environment ```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 ``` 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. ## Docker ```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 ``` `/server_storage` should be owned by the container user and should not be world-readable because it contains analytics data. ## Checks ```bash npm run lint npm run build npm audit --omit=dev ```