| title | Nishchaya Sharma Portfolio |
|---|---|
| emoji | 📊 |
| colorFrom | blue |
| colorTo | gray |
| sdk | docker |
| app_port | 7860 |
| license | mit |
Single-page React app built with Vite and Tailwind CSS.
npm installCreate a local env file:
copy .env.example .env.localSet these values in .env.local and in your hosting provider secrets:
ADMIN_PIN: passcode used to unlock admin panelADMIN_SESSION_SECRET: long random value used to sign admin session cookieDATABASE_URL: Postgres connection stringDATABASE_SSL:truefor Neon and most managed Postgres services
The PIN is now validated on server-side routes (/api/admin/*), so it is not bundled in client JS.
After you change .env.local, restart npm run dev.
npm run devnpm run buildnpm run build
npm run startnpm run verify- Admin unlock uses server session cookie (
HttpOnly) via/api/admin/login. - Open the full admin page at
#/admin. - Admin can edit intro, about, skills, experience, education, projects, certifications, resume, and section visibility.
- With
DATABASE_URLset, admin edits are stored in Postgres. - Without
DATABASE_URL, the app falls back toserver-data/content.json.
Run these from your project root with DATABASE_URL set:
npm run db:backup- Creates a timestamped backup in
backups/content-backup-YYYYMMDD-HHMMSSZ.json. - Optional custom output path:
npm run db:backup -- --out backups/my-manual-backup.jsonRestore the latest backup:
npm run db:restoreRestore a specific backup file:
npm run db:restore -- backups/content-backup-20260207-120000Z.json- Before every restore, a safety snapshot is auto-created at
backups/pre-restore-*.json.
- In Neon, create a project and database.
- Copy the pooled connection string.
- Keep SSL mode enabled in the URL.
- In Hugging Face, click
New Space. - Select
DockerSDK. - Create the Space from your GitHub repo or upload this project files.
In Space settings -> Variables and secrets, add:
ADMIN_PINADMIN_SESSION_SECRETDATABASE_URL(from Neon)DATABASE_SSL=true
- Hugging Face will build using the included
Dockerfile. - Open your Space URL.
- Go to
https://<your-space-url>/#/admin. - Unlock with
ADMIN_PIN. - Save a change, refresh, and confirm it persists.
Run locally with production Neon DATABASE_URL:
npm run db:backup- In Neon, create a project and copy the connection string.
- Use SSL mode in the URL.
- Push this repo to GitHub.
- In Render, click
New->Blueprint. - Select this repo and deploy with the included
render.yaml. - In Render service env vars, set:
ADMIN_PINADMIN_SESSION_SECRETDATABASE_URLDATABASE_SSL=true
- Use
Starterplan if you want no sleep behavior.
- Open the Render service ->
Settings->Custom Domains. - Add
www.nishchaya.app. - Add the DNS records shown by Render inside Name.com.
- For apex
nishchaya.app, either add ALIAS/ANAME to Render target if supported or redirect apex towww.