<strong>An open source platform connecting crypto founders with elite talent to create bounties, and accelerate project completion</strong>
bash
git clone https://github.com/SuperteamDAO/earn.git
bash
cd earn
bash
pnpm i
bash
pnpm add @prisma/adapter-mariadb
Then, uncomment the MariaDB adapter code in src/prisma.ts:
- Line 1: Uncomment the PrismaMariaDb import
- Lines 35-44: Uncomment the URL parsing and adapter creation code
- Line 47: Uncomment the adapter parameter in PrismaClient
Set up your .env file.
Start by copying the .env.example file to a new file named .env. This file will store your local environment settings.
Option 1: Local MySQL (Recommended for Development)
The app automatically detects your database type based on DATABASE_URL. Choose your platform:
🍎 macOS
bash
brew install mysql
Start MySQL service:
bash
brew services start mysql
Create database:
bash
mysql -u root -e "CREATE DATABASE earn_db"
Set DATABASE_URL in .env:
DATABASE_URL='mysql://root@localhost:3306/earn_db'
🪟 Windows
```powershell # Using Chocolatey choco install mysql
# OR using winget winget install Oracle.MySQL ```
Start MySQL (if not already running):
services.msc)OR via command line:
powershell
net start MySQL
Create database:
powershell
mysql -u root -p -e "CREATE DATABASE earn_db"
Enter your root password when prompted.
Set DATABASE_URL in .env:
DATABASE_URL='mysql://root:YOUR_PASSWORD@localhost:3306/earn_db'
Replace YOUR_PASSWORD with your MySQL root password.
🐧 Linux
Ubuntu/Debian:
```bash # Install MySQL sudo apt update sudo apt install mysql-server
# Start MySQL service sudo systemctl start mysql sudo systemctl enable mysql
# Secure installation (optional but recommended) sudo mysql_secure_installation
# Create database sudo mysql -e "CREATE DATABASE earn_db"
# Create user (optional, for better security) sudo mysql -e "CREATE USER 'earnuser'@'localhost' IDENTIFIED BY 'your_password';" sudo mysql -e "GRANT ALL PRIVILEGES ON earn_db.* TO 'earnuser'@'localhost';" sudo mysql -e "FLUSH PRIVILEGES;" ```
Fedora/RHEL/CentOS:
```bash # Install MySQL sudo dnf install mysql-server # or 'yum' for older versions
# Start MySQL service sudo systemctl start mysqld sudo systemctl enable mysqld
# Create database sudo mysql -e "CREATE DATABASE earn_db" ```
Set DATABASE_URL in .env:
``` # If using root: DATABASE_URL='mysql://root@localhost:3306/earn_db'
# If you created a user: DATABASE_URL='mysql://earnuser:your_password@localhost:3306/earn_db' ```
After setting up MySQL, generate Prisma client:
bash
npx prisma generate && npx prisma db push
Option 2: Cloud MySQL Database
If you prefer not to run MySQL locally, you can use cloud services (all have free tiers):
- Setup MySQL with Railway
-
Setup MySQL with Render
- Setup MySQL with PlanetScale
Then set DATABASE_URL in .env with the connection string from your cloud provider.
NEXT_PUBLIC_PRIVY_APP_ID and PRIVY_APP_SECRETPRIVY_VERIFICATION_KEY (hidden under 'Verify with key instead' in Privy App settings)RESEND_API_KEY, visit the Resend dashboard.CLOUDINARY_* API keys, visit the Cloudinary dashboard.JUPITER_API_KEY to your .env fileNEXT_PUBLIC_RPC_WS_URL in your .env file. This is required for wallet-related features.NEXT_PUBLIC_RPC_WS_URL='wss://api.mainnet-beta.solana.com?api-key=abc-xyz'
> Note: Public endpoints have rate limits. For development, consider using devnet: wss://api.devnet.solana.comFacing an issue? Please feel free to reach out to Jill or Abhishek on Twitter.
bash
pnpm devWe welcome contributions from everyone! Whether it's submitting an issue, a pull request, or suggesting new ideas, your input is highly valued. Check out our contributing guide for guidelines on how to proceed.
Facing an issue? Please feel free to reach out to Jill or Abhishek on Twitter.