Welcome! This repository contains a Next.js full‑stack application with Supabase integration and Vercel deployment support.
Follow the steps below to get started after cloning.
- Node.js (v18 or later recommended)
- npm or pnpm or yarn
- Supabase CLI (optional, for local DB management)
- Clone the repo
git clone https://github.com/i-asim/knowledge-hub.git cd knowledge-hub
Install dependencies
npm install
yarn install
pnpm install
Set up environment variablesCreate a .env.local file in the project root:
touch .env.local
Add your keys (example):
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
🏃 Running Locally
Start the dev server:
npm run dev
Visit http://localhost:3000 or https://localhost:8080 in your browser.
📤 Deployment
This project is optimized for Vercel:
Push your repo to GitHub/GitLab/Bitbucket.
Import the project into Vercel.
Add environment variables in the Vercel dashboard.
Deploy — Vercel will handle builds automatically.
📂 Project Structure
. ├── .next/ # Next.js build output (ignored) ├── supabase/ # Supabase migrations & config ├── pages/ # Next.js routes ├── components/ # Reusable UI components ├── lib/ # Utilities & helpers ├── public/ # Static assets ├── .env.local # Local environment variables (ignored) └── README.md # This file
🛡️ Notes
node_modules/ is not committed — run npm install after cloning.
.env* files are ignored for security.
For database migrations, use:
supabase db push
🤝 Contributing
Fork the repo
Create a feature branch (git checkout -b feature-name)
Commit changes (git commit -m "Add feature")
Push to branch (git push origin feature-name)
Open a Pull Request
📜 License
This project is licensed under MIT. See LICENSE for details.