Decibel Tribe: The social network for musicians and industry pros. Find collaborators (drummers, photographers, bookers, merch), connect with peers, plan tours, and explore dating, all within a community that puts music first, DECIBEL TRIBE! Stay Human!
Follow these steps to set up the project for local development.
- Node.js (See
.nvmrcorpackage.jsonfor version. Using nvm is recommended.) - npm (comes with Node.js)
- Git
- Access to a running PostgreSQL database instance.
-
Clone the repository:
git clone https://github.com/petermsouzajr/decibel-tribe.git cd decibel-tribe -
Install dependencies:
npm install
-
Set up Environment Variables:
- Copy the example file:
cp .env.example .env - Edit
.envand fill in all required values, especially:POSTGRES_PRISMA_URL(for migrations/Prisma Client)POSTGRES_URL_NON_POOLING(for Prisma Studio/direct connections)- Stream Chat keys (
NEXT_PUBLIC_STREAM_KEY,STREAM_SECRET) - Lucia secret (
LUCIA_SECRET_KEY) - Google OAuth credentials (if needed for local testing)
- UploadThing keys
- (Add any other critical env vars needed)
- Copy the example file:
-
Database Setup:
- Ensure your PostgreSQL database is running and accessible via the connection URL in
.env. - Apply migrations to set up the schema:
npx prisma migrate dev
- (Optional, but recommended for development) Seed the database with test data:
npm run db:seed
- Ensure your PostgreSQL database is running and accessible via the connection URL in
-
(Optional) View Database: You can use Prisma Studio to view your local database:
npx prisma studio
Once setup is complete, start the development server:
npm run devThe application should be accessible at http://localhost:3000 (or the port specified in your .env or Next.js config).
This project uses Vitest for unit, integration, and seed tests, and Cypress for End-to-End (E2E) tests.
- Run all developer-focused tests (Vitest - Unit, Integration, Seed):
npm run dev:test:all
- Run comprehensive developer checks (Lint, Types, Tests, Build):
This is the recommended command to run before committing or pushing changes.
npm run dev:check:all
For more detailed information on specific testing commands (watch mode, UI, coverage, Cypress tests), please see the CONTRIBUTING.md guide.
Contributions are welcome! Please read our contribution guidelines and code of conduct before submitting pull requests.