A Next.js application for crypto education, community learning, and Web3 onboarding.
Coinlect welcomes contributions from developers, educators, and crypto enthusiasts.
- Contribution guide: CONTRIBUTING.md
- License: LICENSE
- Environment template: .env.example
We follow a pull-request workflow with maintainer review and approval. Direct pushes to main are not allowed.
Prerequisites: Node.js 18+
-
Install dependencies:
npm install
-
Copy the environment template and update your local values:
cp .env.example .env.local
-
Set your local environment variables in
.env.local(includingGEMINI_API_KEYand your PostgreSQL connection string):DATABASE_URL=postgresql://username:password@localhost:5432/coinlect_db JWT_SECRET=your-super-secret-jwt-key NEXT_PUBLIC_APP_URL=http://localhost:3000 NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com GEMINI_API_KEY=your_api_key_here
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
npm run build
npm startCoinlect is designed to run with a PostgreSQL database and environment variables supplied at runtime. For an open-source repo, the backend configuration stays private and should never be committed to Git.
Typical setup:
- Provision a PostgreSQL database.
- Copy .env.example to
.env.localand fill in your values. - Run Prisma migrations:
npx prisma generate npx prisma migrate dev
- Start the app with your local or deployment environment secrets loaded.
Production deployment options:
- Vercel or similar hosting for the Next.js app
- Managed PostgreSQL database (for example Neon, Supabase, Railway, or a standard Postgres provider)
- Platform environment variables or secret manager for
DATABASE_URL,JWT_SECRET, OAuth credentials, andGEMINI_API_KEY
Do not commit real credentials, API keys, or database URLs. Keep them in .env.local for local development and in your hosting platform's secret store for production.
Copy .env.example to .env.local and fill in the required values:
cp .env.example .env.localRequired variables:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- Secret key for JWT tokensNEXT_PUBLIC_APP_URL- Your application URLNEXT_PUBLIC_GOOGLE_CLIENT_ID- Google OAuth client ID for the frontendGOOGLE_CLIENT_ID- Google OAuth client ID for server-side auth flowsGEMINI_API_KEY- API key for the AI chat functionality
See .env.example for the full template.
- Create a PostgreSQL database
- Run migrations:
npx prisma migrate dev
- Generate Prisma client:
npx prisma generate
- Next.js 15 - React framework with App Router
- TypeScript - Type safety
- Tailwind CSS - Styling
- Prisma - Database ORM
- PostgreSQL - Database
- React Context - State management (Theme, Auth, Language)
