Skip to content

Getting Started

garotm edited this page Nov 29, 2024 · 1 revision

Getting Started

Introduction

Welcome to fleXRP! This guide will help you set up your development environment and make your first contribution to the project.

Prerequisites

  • Python 3.11+
  • Git
  • Docker (optional, but recommended)
  • A GitHub account

Initial Setup

1. Fork the Repository

  1. Visit fleXRP Repository
  2. Click the "Fork" button in the top-right corner
  3. Select your account as the destination

2. Clone Your Fork

git clone https://github.com/[your-username]/fleXRP.git
cd fleXRP

3. Set Up Development Environment

Create Python Virtual Environment

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Unix/macOS:
source venv/bin/activate
# On Windows:
.\venv\Scripts\activate

Install Dependencies

# Install project dependencies
pip install -r requirements.txt

# Install development dependencies
pip install -r requirements-dev.txt

4. Configure Git

Add Upstream Remote

git remote add upstream https://github.com/fleXRPL/fleXRP.git

Set Up Pre-commit Hooks

pre-commit install

Project Structure

fleXRP/
├── src/
│   ├── api/            # API implementation
│   │   ├── routes/     # API routes
│   │   └── templates/  # HTML templates
│   ├── core/           # Core functionality
│   └── services/       # Business logic services
├── tests/              # Test suite
├── docs/              # Documentation
└── docker/            # Docker configuration

Development Workflow

1. Create a Feature Branch

# Sync with upstream
git fetch upstream
git checkout main
git merge upstream/main

# Create feature branch
git checkout -b feature/your-feature-name

2. Make Changes

  1. Write your code
  2. Add tests
  3. Update documentation
  4. Run local tests

3. Commit Changes

# Stage changes
git add .

# Commit with meaningful message
git commit -m "feat: add new feature"

4. Submit Pull Request

  1. Push to your fork
  2. Create PR on GitHub
  3. Wait for review
  4. Make requested changes if needed

Local Development

Running the Application

# Set up environment variables
cp .env.example .env
# Edit .env with your settings

# Run the application
flask run

Running Tests

# Run all tests
pytest

# Run specific test file
pytest tests/test_specific.py

# Run with coverage
pytest --cov=src tests/

Using Docker

# Build container
docker build -t flexrp .

# Run container
docker run -p 5000:5000 flexrp

Common Tasks

Database Migrations

# Create migration
flask db migrate -m "description"

# Apply migration
flask db upgrade

Code Formatting

# Format code
black src/

# Check types
mypy src/

# Run linter
flake8 src/

Getting Help

Documentation

Community Support

Troubleshooting

  • Check the logs: tail -f logs/flexrp.log
  • Enable debug mode: export FLASK_DEBUG=1
  • Use debugger: pytest --pdb

Next Steps

  1. Review Code Standards
  2. Read Testing Guide
  3. Find an issue to work on
  4. Join project discussions

This documentation is maintained by the fleXRP team.

Clone this wiki locally