Development Setup
Prerequisites
System Requirements
- Node.js 18+ (for backend development)
- Python 3.8+ (for data science)
- PostgreSQL 13+ (for database)
- Git (for version control)
- Docker (for containerization)
Cloud Accounts
- Google Cloud account (for storage and services)
- Heroku account (for deployment)
- GitHub account (for code repositories)
Local Development Environment
1. Clone Repositories
# Main repositories
git clone https://github.com/credinvest/cred-api-commercial.git
git clone https://github.com/credinvest/cred-web-commercial.git
git clone https://github.com/credinvest/cred-ios-commercial.git
git clone https://github.com/credinvest/cred-model.git
git clone https://github.com/credinvest/cred-data.git
2. Environment Configuration
Create .env files for each project:
# Example .env for API
PORT=8080
ENV=development
DATABASE_URL=postgresql://user:password@localhost:5432/cred_dev
ANTHROPIC_API_KEY=your-anthropic-key
OPENAI_API_KEY=your-openai-key
JWT_SECRET=your-jwt-secret
3. Database Setup
# Install PostgreSQL
brew install postgresql # macOS
# or
sudo apt-get install postgresql # Ubuntu
# Start PostgreSQL
brew services start postgresql # macOS
# or
sudo systemctl start postgresql # Ubuntu
# Create database
createdb cred_dev
4. Install Dependencies
# For each project
cd project-directory
npm install # or yarn install
5. Run Migrations
# Run database migrations
npm run migrate
# or
yarn migrate
Development Tools Setup
VS Code Extensions
Install these recommended extensions:
{
"recommendations": [
"ms-vscode.vscode-typescript-next",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"ms-vscode.vscode-eslint",
"ms-python.python",
"ms-python.pylint",
"ms-toolsai.jupyter"
]
}
Git Configuration
# Set up Git user
git config --global user.name "Your Name"
git config --global user.email "your.email@credinvestments.com"
# Set up SSH key
ssh-keygen -t ed25519 -C "your.email@credinvestments.com"
# Add to GitHub account
Docker Setup
# Install Docker Desktop
# Download from: https://www.docker.com/products/docker-desktop
# Test installation
docker --version
docker-compose --version
Testing Your Setup
1. Start Development Servers
# API Server
cd cred-api-commercial
npm run start:dev
# Web App
cd cred-web-commercial
npm run dev
# Data Science
cd cred-data
jupyter notebook
2. Verify Connections
- API server running on http://localhost:8080
- Web app running on http://localhost:3000
- Database connection successful
- External API keys working
3. Run Tests
# Run test suites
npm test
npm run test:e2e
Troubleshooting
Common Issues
Database Connection Failed
# Check PostgreSQL status
brew services list | grep postgresql
# or
sudo systemctl status postgresql
# Restart if needed
brew services restart postgresql
Port Already in Use
# Find process using port
lsof -i :8080
# Kill process
kill -9 <PID>
Node Modules Issues
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install
Getting Help
- Check project-specific README files
- Ask in #tech Slack channel
- Review Development Workflow
- Tag team members for specific issues
Next Steps
- Complete Setup: Ensure all tools are working
- Take First Task: Get a Linear task to work on
- Make First PR: Follow the development workflow
- Join Standups: Attend daily team standups
Setup complete! Ready to start developing? 🚀