Skip to main content

Getting Started

Thank you for considering contributing to Deltalytix! This guide will help you get started with the development workflow.

Prerequisites

Before you begin, ensure you have:
  • Node.js 20+ or Bun (latest version)
  • Git for version control
  • PostgreSQL database access (or Supabase account)
  • Basic knowledge of TypeScript and React

Required Accounts

For full development capabilities:
  • Supabase account (free tier available)
  • Stripe account (for payment features)
  • OpenAI API key (for AI features)
  • Discord application (for OAuth)

Development Setup

1. Fork and Clone

First, fork the repository and clone it locally:
git clone https://github.com/YOUR_USERNAME/deltalytix.git
cd deltalytix

2. Install Dependencies

Using npm:
npm install
Or using Bun (recommended):
bun install

3. Environment Setup

Create a .env.local file with required variables:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key

# Database
DATABASE_URL=your_postgresql_connection_string

# OpenAI
OPENAI_API_KEY=your_openai_api_key

# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret

# Discord OAuth
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret

# Application
NEXT_PUBLIC_APP_URL=http://localhost:3000
Never commit .env.local to version control. It’s already in .gitignore.

4. Database Setup

Generate Prisma client and push schema:
# Generate Prisma client
npx prisma generate

# Push schema to database (development)
npx prisma db push

# Or run migrations (production)
npx prisma migrate dev

5. Run Development Server

Start the development server:
npm run dev
# or
bun dev
Open http://localhost:3000 to view the application.

Development Workflow

Creating a Feature Branch

Always create a new branch for your work:
git checkout -b feature/amazing-feature
Branch naming conventions:
  • feature/ - New features
  • fix/ - Bug fixes
  • docs/ - Documentation updates
  • refactor/ - Code refactoring
  • test/ - Adding tests

Making Changes

  1. Write clean code: Follow TypeScript and React best practices
  2. Test thoroughly: Test on both desktop and mobile
  3. Update translations: Add translations for any user-facing text
  4. Document changes: Update relevant documentation

Available Commands

# Start development server
npm run dev

# Type checking
npm run typecheck

# Linting
npm run lint

Type Checking

Before submitting, ensure there are no type errors:
npm run typecheck
Deltalytix uses TypeScript strict mode. All code must be properly typed.

Linting

Run ESLint to check for code issues:
npm run lint
The project uses ESLint with Next.js configuration.

Submitting Changes

Commit Guidelines

Write clear, descriptive commit messages:
# Good examples
git commit -m "Add weekday filter for PnL charts"
git commit -m "Fix commission calculation for multi-leg trades"
git commit -m "Update French translations for dashboard"

# Bad examples
git commit -m "fix bug"
git commit -m "updates"
git commit -m "WIP"

Commit Message Format

<type>: <description>

[optional body]

[optional footer]
Types:
  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation changes
  • style: - Code style changes (formatting)
  • refactor: - Code refactoring
  • test: - Adding tests
  • chore: - Build process or tool changes

Push Your Changes

git push origin feature/amazing-feature

Create a Pull Request

  1. Go to the Deltalytix repository
  2. Click “New Pull Request”
  3. Select your fork and branch
  4. Fill in the PR template:
    • Description: What does this PR do?
    • Type of change: Bug fix, feature, etc.
    • Testing: How did you test it?
    • Screenshots: If UI changes, include screenshots

PR Checklist

Before submitting your PR, ensure:
  • Code follows the project’s style guidelines
  • Self-review of your own code completed
  • Code is properly commented where necessary
  • Documentation updated if needed
  • No new warnings or errors introduced
  • All translations added for new text
  • Tested on desktop and mobile
  • Type checking passes (npm run typecheck)
  • Linting passes (npm run lint)

Code Review Process

What to Expect

  1. Initial review: Maintainers will review your PR within a few days
  2. Feedback: You may receive requests for changes
  3. Discussion: Questions and suggestions in PR comments
  4. Approval: Once approved, your PR will be merged

Responding to Feedback

  • Be open to suggestions and constructive criticism
  • Make requested changes in new commits
  • Respond to comments to keep the conversation going
  • Ask questions if something is unclear

After Your PR is Merged

Congratulations! 🎉
  • Your contribution will be included in the next release
  • You’ll be credited in release notes (for significant changes)
  • You can delete your feature branch

Reporting Bugs

Before Reporting

  1. Search existing issues: Check if it’s already reported
  2. Reproduce the bug: Ensure it’s reproducible
  3. Check version: Make sure you’re on the latest version

Bug Report Template

When creating a bug report, include:
## Description
Clear description of the bug

## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error

## Expected Behavior
What should happen

## Actual Behavior
What actually happens

## Screenshots
If applicable, add screenshots

## Environment
- OS: [e.g., macOS, Windows, Linux]
- Browser: [e.g., Chrome, Firefox, Safari]
- Version: [e.g., 0.3]

## Additional Context
Any other relevant information

Report a Bug

Create a new issue on GitHub

Feature Requests

Proposing Features

We welcome feature ideas! Use GitHub Discussions for feature requests:
  1. Search first: Check if someone already suggested it
  2. Be specific: Clearly describe the feature
  3. Explain the use case: Why is this needed?
  4. Consider alternatives: Are there other ways to achieve this?

Feature Request Template

## Feature Description
Clear description of the feature

## Use Case
Why is this feature needed?
Who would benefit from it?

## Proposed Solution
How should it work?

## Alternatives Considered
Other approaches you've considered

## Additional Context
Mockups, examples, or references

Request a Feature

Start a discussion on GitHub

Need Help?

If you’re stuck or have questions:
First time contributing to open source? Don’t worry! We’re here to help. Look for issues labeled good first issue to get started.

Build docs developers (and LLMs) love