Orbis is a sophisticated event management platform designed to simplify and elevate the experience of organizing, hosting, and participating in events at NITK.
This platform features:
- Event creation and management
- User profiles and authentication
- Team formation and management
- Project submissions
- Application tracking
- Frontend: React, Vite, TailwindCSS
- Backend: Node.js, Express
- Database: PostgreSQL (via Supabase)
- ORM: Prisma
- Authentication: Auth0
-
Clone the Repository
git clone https://github.com/yourusername/orbis.git cd orbis
-
Backend Setup
cd backend npm install
-
Backend Environment Configuration Create a
.env
file in the backend directory with the following variables:DATABASE_URL="your-supabase-postgres-connection-string" PORT=4000 NODE_ENV=development CORS_ORIGIN=http://localhost:3000 AUTH0_ISSUER_BASE_URL="your-auth0-issuer-url" AUTH0_AUDIENCE="your-auth0-audience" AUTH0_CLIENT_SECRET="your-auth0-client-secret"
-
Prisma Setup
# Generate Prisma client npx prisma generate # Push schema changes to database (development only) npx prisma db push
-
Start the Backend Server
npm run dev
The backend will run on http://localhost:4000
-
Frontend Setup (in a new terminal)
cd ../frontend npm install
-
Frontend Environment Configuration Create a
.env
file in the frontend directory with the following variables:VITE_API_URL=http://localhost:4000 # Supabase VITE_SUPABASE_URL="your-supabase-url" VITE_SUPABASE_ANON_KEY="your-supabase-anon-key" VITE_SUPABASE_SERVICE_ROLE_KEY="your-supabase-service-role-key" # Auth0 VITE_AUTH0_DOMAIN="your-auth0-domain" VITE_AUTH0_CLIENT_ID="your-auth0-client-id" VITE_AUTH0_AUDIENCE="your-auth0-audience" VITE_AUTH0_SCOPE="openid profile email"
-
Start the Frontend Server
npm run dev
The frontend will run on http://localhost:3000
Prisma simplifies database operations through its type-safe client. Here are some common commands:
# Update Prisma client after schema changes
npx prisma generate
# Create a migration (in development)
npx prisma migrate dev --name descriptive_name
# Apply migrations to production
npx prisma migrate deploy
# Reset the database (WARNING: Deletes all data)
npx prisma migrate reset
# Launch Prisma Studio (visual database explorer)
npx prisma studio
Prisma Studio will be available at http://localhost:5555 when running the npx prisma studio
command.
The database schema is defined in prisma/schema.prisma
. This file defines:
- Data models
- Relationships between models
- Default values
- Indexes and constraints
Always run npx prisma generate
after making changes to the schema to update the Prisma client.
The backend provides RESTful API endpoints for various features:
- Auth: User registration, login, profile management
- Events: Create, update, list, and manage events
- Teams: Form teams and manage team members
- Projects: Submit and manage project details
- Profiles: Manage user profiles
- Use clear and concise comments to explain complex code blocks
- Use JSDoc style comments for functions and components
- Follow the Airbnb JavaScript Style Guide
- Use 2 spaces for indentation
- Prefer
const
andlet
overvar
- Use arrow functions for anonymous functions
- Use single quotes for strings
- Place opening braces on the same line as the statement
- Use camelCase for variable and function names
- Use PascalCase for React components and class names
- Use UPPER_SNAKE_CASE for constants
- Choose meaningful and descriptive names
- Write clear and concise commit messages
- Use present tense and imperative mood
- Capitalize the first letter
- Include a brief description of changes
- Reference relevant issue numbers
- Use prefixes like
fix:
,feat:
,frontend:
,backend:
,misc:
- Use feature branches for new features and bug fixes
- Keep the
main
branch in a deployable state - Regularly pull changes from
main
- Perform code reviews and seek feedback