Skip to main content

Development Setup

Congratulations! You're ready to start developing with Edward's Second Brain. Here's how to get your development environment set up.

Prerequisites​

Before you begin, ensure you have the following installed:

  • Node.js 20+: Download here
  • pnpm: npm install -g pnpm
  • Git: For version control

Quick Start​

  1. Clone the repository:

    git clone https://github.com/edcalderon/my-second-brain.git
    cd my-second-brain
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    cp apps/dashboard/.env.example apps/dashboard/.env.local
    # Edit .env.local with your API keys
  4. Start development servers:

    # Terminal 1: Dashboard
    npm run dev

    # Terminal 2: Documentation
    npm run dev:docs

Environment Configuration​

Required API Keys​

You'll need to obtain API keys for the following services:

Server-only provider integrations​

  • Keep provider API keys in the server environment only.
  • Do not add provider credentials to .env.local values prefixed with NEXT_PUBLIC_.

Firebase​

  • Create a Firebase project at Firebase Console
  • Enable Authentication and Firestore
  • Add Firebase config variables to .env.local

Development Workflow​

Making Changes​

  1. Create a feature branch:

    git checkout -b feature/your-feature-name
  2. Make your changes and test locally

  3. Version your changes:

    npm run version:patch  # For bug fixes
    npm run version:minor # For new features
    npm run version:major # For breaking changes
  4. Push and create PR:

    git push origin feature/your-feature-name

Testing​

# Run all tests
pnpm --filter @ed/dashboard test

# Build all apps
npm run build

# Validate versions
npm run version:validate

Project Structure​

edward/
├── apps/
│ ├── dashboard/ # Main web application
│ └── docs/ # Documentation site
├── packages/
│ └── versioning/ # Version management CLI
├── scripts/ # Deployment scripts
└── config/ # Configuration files

Key Scripts​

CommandDescription
npm run devStart dashboard development server
npm run dev:docsStart documentation development server
npm run buildBuild all applications
npm run version:patchCreate patch release
npm run version:validateCheck version consistency

Contributing​

  1. Follow conventional commit format
  2. Write tests for new features
  3. Update documentation as needed
  4. Ensure all CI checks pass

Getting Help​

  • Documentation: You're reading it! Check other sections for detailed guides
  • Issues: Report bugs on GitHub Issues
  • Discussions: Ask questions on GitHub Discussions

What's Next?​

Happy coding! 🚀