- GitHub repository with the HackMate Platform code
- Netlify account
-
Connect Repository to Netlify
- Go to Netlify
- Click "New site from Git"
- Connect your GitHub repository
- Select the repository containing HackMate Platform
-
Configure Build Settings
- Build command:
npm run build - Publish directory:
.next - Node version:
18
- Build command:
-
Set Environment Variables In Netlify dashboard, go to Site settings > Environment variables and add:
JWT_SECRET=your-super-secret-jwt-key-here NODE_ENV=production -
Deploy
- Click "Deploy site"
- Wait for the build to complete
- Database: The app uses an in-memory SQLite database on Netlify (data won't persist between deployments)
- Authentication: Works for demo purposes but data resets on each deployment
- API Routes: Next.js API routes are automatically handled by Netlify
To make this production-ready, you'll need to:
-
Replace SQLite with a cloud database:
- Use PlanetScale, Supabase, or Neon
- Update
src/db/index.tsto use the cloud database - Set
DATABASE_URLenvironment variable
-
Set up proper authentication:
- Use NextAuth.js or similar
- Configure OAuth providers
- Set up proper session management
-
Add file storage:
- Use Cloudinary, AWS S3, or similar
- For user avatars and file uploads
-
Clone the repository
git clone <your-repo-url> cd hackmate-platform
-
Install dependencies
npm install
-
Set up environment variables
cp env.example .env.local # Edit .env.local with your values -
Run the development server
npm run dev
-
Access the application
-
Build fails on Netlify
- Check Node.js version (should be 18)
- Ensure all dependencies are in package.json
- Check build logs for specific errors
-
Database errors
- The app automatically falls back to in-memory database on Netlify
- For local development, ensure the database file is created
-
Authentication not working
- Check JWT_SECRET environment variable
- Ensure API routes are properly configured
For issues or questions, please check the GitHub repository issues or create a new one.