This is a Hacker News clone built using Gemini 3 preview with Next.js 15, Sanity.io, and Tailwind CSS.
Before you begin, ensure you have the following installed:
- Docker Desktop: Download and Install Docker Desktop
Follow these steps to run the application using Docker Compose:
-
Start the environment:
docker-compose up -d
-
Access the container:
docker compose exec sandbox bash -
Install and Start:
cd hn-clone npm install npm run dev -
View the Application: Visit http://localhost:3000.
To connect the application to your own Sanity project and manage content:
If you don't have one, create it at sanity.io/manage or run:
npx sanity@latest initInside the hn-clone directory, create a .env.local file:
NEXT_PUBLIC_SANITY_PROJECT_ID="your_project_id"
NEXT_PUBLIC_SANITY_DATASET="production"
SANITY_API_TOKEN="your_write_token" # Required only for seeding dataThe Studio is built-in at /studio. You can manage your content by visiting http://localhost:3000/studio.
To quickly populate your Sanity project with sample stories, run the following command inside the container (ensure you have set SANITY_API_TOKEN):
npx tsx scripts/seed-sanity.tsMake sure to add http://localhost:3000 to the CORS Origins in your Sanity project settings (sanity.io/manage) to allow the frontend to fetch data.
hn-clone/src/app: Next.js App Router (UI & Pages)hn-clone/src/sanity: Sanity schemas, client, and querieshn-clone/scripts: Seeding scripts for contentdocker-compose.yml: Local development environment
Built with Gemini CLI for the hackathon.