🚧 Under Construction! 🚧
Hi.new is currently a work-in-progress and not yet production-ready. It will launch at hi.new when it's ready.
This is a project was created by the team behind Inbox Zero, the world's best AI assistant for email.
Hi.new is a minimalist contact shortlink platform. Allow anyone to contact you or your AI agent.
You get your own link at hi.new/elie where anyone can contact you. Messages are then forwarded on to your email or a webhook.
Messages can be sent using:
- GET (regular contact form)
- POST (contact via API request)
Contact via API is perfect for AI agents.
Hi.new allows for human-human, human-bot, bot-human, and bot-bot communcation.
- Next.js
- Resend
- TaskMaster
PRs for roadmap features are welcome and encouraged. This is a community driven project.
- Receive messages through other channels such as SMS, Slack, or WhatsApp.
- Marketplace (for agents)
- Full chat on hi.new
- Give each user their own email (i.e. messaging hi.new/elie or elie@hi.new has the same result)
Follow these steps to get the hi.new development environment running locally:
-
Clone the Repository (if you haven't already).
-
Install Dependencies:
pnpm install
-
Set Up Local Database (Docker):
- Ensure Docker is installed and running (Docker Desktop).
- Copy
.env.exampleto.env.localand configure your environment variables, especially:DATABASE_URL="postgresql://postgres:password@localhost:5434/hinew?schema=public" # Also set RESEND_API_KEY, UPSTASH_REDIS_REST_URL, UPSTASH_REDIS_REST_TOKEN, AUTH_SECRET
- Start the PostgreSQL container:
docker-compose up -d
- Apply database migrations:
pnpm exec prisma migrate deploy - (Optional, if client is out of sync) Generate Prisma client:
pnpm exec prisma generate - For more details on managing the Dockerized database, see the "Local Development Database (Docker)" section below (or we can keep the detailed steps here if you prefer to remove the separate subsection).
-
Run the Development Server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
For local development, this project is configured to use a PostgreSQL database running in Docker. This ensures a consistent database environment.
-
Ensure Docker is Installed and Running: If you don't have Docker installed, download and install Docker Desktop.
-
Configure Environment Variables:
- Copy the
.env.examplefile to a new file named.env.localin the project root. - Ensure the
DATABASE_URLin.env.localis set to:DATABASE_URL="postgresql://postgres:password@localhost:5434/hinew?schema=public" - Fill in any other required environment variables in
.env.local(e.g.,RESEND_API_KEY,UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN,AUTH_SECRET).
- Copy the
-
Start the PostgreSQL Container: In your project root directory, run:
docker-compose up -d
This command will start the PostgreSQL database service defined in the
[docker-compose.yml](mdc:docker-compose.yml)file. The-dflag runs it in detached mode. The database will be accessible onlocalhost:5434, and data will be persisted in the./.pgdata/directory (which should be in your.gitignore). -
Apply Database Migrations: Once the Docker container is running and the database is ready, apply the Prisma migrations to set up your database schema:
pnpm exec prisma migrate deployIf this is the very first time or you encounter issues, you might need to ensure your database is clean or use
pnpm exec prisma migrate reset(this will delete data) followed bypnpm exec prisma migrate deployorpnpm exec prisma db push --accept-data-lossfor a fresh schema push (use with caution if you have data). -
Run Prisma Generate (if not automatically run by migrate):
pnpm exec prisma generate
Now your Next.js application should be able to connect to the local Dockerized PostgreSQL database when you run pnpm dev.
To stop the database container, run: docker-compose down
To view logs: docker-compose logs postgres
TaskMaster was used to build this project.
Steps taken to create this project:
- npx create-next-app@latest hinew
- Install TaskMaster MCP
- Init TM: "Can you please initialize taskmaster-ai into my project?"
- Create PRD with Claude to match example example_prd.txt
- Paste in scripts/prd.txt
- TM: "Can you parse my PRD at scripts/prd.txt?" (this created the tasks)
Now the basic set up is done here's what I did next: (Doesn't show every single prompt, but gets most of it. There was a little manual fixing from me along the way, but after initial project / Prisma / auth was done, it was mostly going on its own). With me often just saying go to next step, or doing a prisma migrate or shadcn add and then having it continue.
- TM: "ive already set up nextjs. mark it as done. what's next?"
- TM: "let's go add this. here's the docs for it: @https://www.better-auth.com/"
- TM: "this is how you do it: https://www.better-auth.com/docs/integrations/next"
- TM: "this is how we do prisma: https://www.better-auth.com/docs/adapters/prisma"
- Add Prisma myself:
npm install @prisma/clientnpm install prisma --save-devnpx prismanpx prisma init --datasource-provider postgresql --output ../generated/prisma
-
Reverted Prisma to v6.6 to run
npx @better-auth/cli@latest generate -
Removed some tasks from the task list
-
TM: "i initialised the schema now. let's keep going and mark relevant tasks as done"
-
Handled env vars
-
TM: "keep going. i want a basic frontend working"
-
TM: "here's a shadcn login form we can add. make sure shadcn is set up too" (shared shadcn code block too)
-
pnpm dlx shadcn@latest init -
TM: "this is how we add shadcn components nowadays: 'pnpm dlx shadcn@latest add button'"
-
TM: "ok i did it. we're using react. not vue fyi. let's keep going in our work. we had some errors on login form"
-
Added Better Auth docs to Cursor
-
TM: "@BetterAuth here are the docs to help you"
-
TM: "did you do a lot of copy paste code for the sign up and sign. can we fix that?"
-
TM: "i like react hook form and zod for validation"
-
Fixed bug with styling/Tailwind myself
-
TM: "i like react hook form and zod for validation. also we dont have google login. just keep it simple with username/pw for now. update tasks"
-
TM: "fix lint errors"
-
TM: "lets get to next task now. i want to get to the contact form implementation and POST because that's one of the main features"
-
TM: "i ran prisma generate. keep going"
-
lets take a step back. a user should be able to create multiple links / contact forms. they could go to different bots or emails
-
no you got it wrong. all links are: hi.new/LINK a user could have 10 of those though
-
how to use prisma with nextjs: @https://www.prisma.io/docs/orm/more/help-and-troubleshooting/nextjs-help stop doing new prisma client in each file
-
replace new prisma() in the whole project
-
/Generate Cursor Rules for some of the stuff we've learnt here. like how to use prisma and how to shadcn install components with the correct syntax: pnpm dlx shadcn-ui@latest add form also we use pnpm and not npm
-
ok keep going on our tasks
-
we need to add the contact form. and POST request for people to call via api. find the task for it
-
yes. but we also need to support POST requests to that url. can that be done in nextjs?
-
update tasks first. then we can do resend stuff
-
i added textarea already. you can do resend
-
webhook now
-
lets complete the pending tasks we have like 5,6,7. or update statuses if done
-
can the user see all their links and edit them? with delivery options? also do they get a secret key for webhook to verify we sent it to them? lets do that
-
we dont use server actions to get data. we use GET. server actions are POST
-
you needed to import the types from "@/generated/prisma". prisma changed @prisma-best-practices.mdc
-
Given your interest in the core link functionality, would you like to start working on the "Manage Link" page, specifically focusing on allowing users to add Delivery Options (Email/Webhook) to their links? This seems like a very logical next piece. - yes
-
update task list. and add new tasks we need to do next
-
tasks 29-32
-
use lucide for icons
-
list tasks. then update task statuses
-
sure you can do logout now
-
sure. also update tasks
-
sure. you can use upstash for rate limits: @https://upstash.com/docs/redis/sdks/ratelimit-ts/overview
-
we need to fix this: "Conflicting route and page at /[slug]: route at /[slug]/route and page at /[slug]/page". we do want a post and get request, but the current approach doesn't work
-
you have it wrong. the error clearly shows you cant have route and page conflict. so i guess lets just change the route for the post. could be api/LINK/route.ts i guess
-
I made a manual fix using redirects
-
i want to run a postgres db at: DATABASE_URL="postgresql://postgres:password@localhost:5434/hinew?schema=public". using docker for this is good
-
you can update gitignore and readme file to explain how to run it for people self-hosting
-
i made a small update. let's update the getting started now as pnpm dev on its own no longer works. also user needs to pnpm install as a step. keep it concise
-
I created a migration file using Prisma
-
pnpm install @prisma/adapter-pg -
fix prisma @prisma.ts. this is how the new prisma works: import { PrismaPg } from '@prisma/adapter-pg' import { PrismaClient } from './generated/prisma'
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }) const prisma = new PrismaClient({ adapter })
-
why did you import pg? follow my example correctly
-
ah we need these flags: generator client { provider = "prisma-client-js" // or
prisma-clientpreviewFeatures = ["queryCompiler", "driverAdapters"] output = "../generated/prisma" } @schema.prisma -
create a landing page for the project. it should be clean, minimal and modern @page.tsx
-
use blue instead. hero cop update: One link to say hi to anyone—human or AI. subheading should mention you can say hi via api or contact form
-
lets make the rate limiter optional so people can run the project without installing upstash
-
Remove boilerplate code
-
Some manual cleanup to fix contact sending