Prerequisites
Before you begin, ensure you have the following installed and configured:- Node.js 20+ - Required for Next.js 15 and modern JavaScript features
- npm, yarn, or pnpm - Package manager of your choice
- Convex Account - Sign up at convex.dev
- Clerk Account - Sign up at clerk.com
- Resend Account (Optional) - For email notifications resend.com
Installation Steps
Install Dependencies
Install all required packages using your preferred package manager:This will install all dependencies including:
- Next.js 15.4.9
- React 19.2.1
- Convex 1.32.0
- Clerk Next.js 6.39.0
- Tailwind CSS 4.1.11
- And more…
Set Up Environment Variables
Create a See the Environment Variables page for detailed configuration.
.env.local file in the root directory:Initialize Convex
Set up your Convex backend:This will:
- Create a new Convex project (if needed)
- Set up database schemas
- Start the Convex development server
- Generate your
NEXT_PUBLIC_CONVEX_URL
Configure Clerk Authentication
- Go to clerk.com and create a new application
- Copy your publishable key and secret key
- Add them to your
.env.localfile - Configure sign-in and sign-up URLs (already set to
/sign-inand/sign-up)
Verify Installation
Once both servers are running:- Convex Dev Server should be running on port 3210 (or similar)
- Next.js Dev Server should be running on
http://localhost:3000 - Navigate to
http://localhost:3000in your browser - You should see the AiVault homepage
Common Issues
Port Already in Use
If port 3000 is already in use, you can specify a different port:Convex Connection Issues
Make sure yourNEXT_PUBLIC_CONVEX_URL in .env.local matches the URL provided by convex dev.
Clerk Authentication Errors
Ensure your Clerk keys are correctly copied and that your application domain is configured in the Clerk dashboard.Next Steps
Environment Variables
Configure all required environment variables
Configuration
Learn about Next.js and Tailwind configuration