-
Notifications
You must be signed in to change notification settings - Fork 0
DEVELOPER_SETUP.md
Version: 1.0 Project: CeloHT Environment: Linux / macOS / Windows Primary Stack: Next.js, React, TypeScript, Node.js, PostgreSQL, Celo
This guide explains how developers can prepare a local environment for contributing to CeloHT projects.
The goal is to provide a predictable development workflow from repository setup to local testing.
Developer
│
▼
GitHub Repository
│
▼
Local Development Environment
│
├── Frontend
├── Backend / API
├── Database
└── Blockchain Development Tools
│
▼
Tests
│
▼
Pull Request
│
▼
CI/CD
Developers should have:
- Git
- Node.js
- npm or another supported package manager
- A modern browser
- Code editor
- GitHub account
- Celo-compatible wallet for blockchain testing where required
For specific repositories, always follow the repository's own README.md.
Example:
git clone <REPOSITORY_URL>
cd <REPOSITORY_DIRECTORY>Do not commit directly to the production branch unless repository policy explicitly permits it.
For a Node.js project:
npm installUse the package manager and lockfile defined by the repository.
Do not randomly replace package managers because this can create dependency inconsistencies.
Projects may require environment variables.
Example:
DATABASE_URL=
NEXT_PUBLIC_CELO_NETWORK=
NEXT_PUBLIC_RPC_URL=
NEXT_PUBLIC_CONTRACT_ADDRESS=
Environment files containing secrets must not be committed.
Use:
.env.local
for local-only configuration where supported.
CeloHT environments should conceptually remain separate:
Development
│
▼
Testing
│
▼
Staging
│
▼
Production
Production credentials must never be used for ordinary local development.
Typical Next.js command:
npm run devThe repository README should specify the exact local URL.
npm run buildA successful development server does not guarantee that the production build will succeed.
Both should be tested before merging significant changes.
Typical command:
npm testIf the repository defines additional test commands, use those commands as documented.
Typical command:
npm run lintLint errors should normally be fixed before opening a pull request.
If the repository uses Prettier:
npm run formatFormatting should remain consistent across the project.
For TypeScript projects:
npx tsc --noEmitType errors should be resolved before merging.
Database-dependent repositories should document:
- Database provider
- Local setup
- Migration commands
- Seed commands
- Reset procedure
Never connect a local development environment to a production database unless explicitly authorized.
Blockchain-enabled repositories should document:
- Network
- Chain ID
- RPC configuration
- Contract addresses
- ABI source
- Wallet requirements
- Testnet procedure
Developers should use testnet or local environments before interacting with production contracts.
For wallet-enabled applications:
- Connect a test wallet.
- Confirm the network.
- Confirm the wallet address.
- Confirm the requested transaction.
- Test transaction failure states.
- Verify the resulting transaction on the blockchain.
Never use a wallet containing important funds for experimental development.
A typical CeloHT application may resemble:
project/
├── app/
├── components/
├── lib/
├── services/
├── contracts/
├── public/
├── tests/
├── docs/
├── scripts/
├── .github/
├── package.json
└── README.md
Actual structure depends on the repository.
Recommended workflow:
main
│
├── feature/*
├── fix/*
└── docs/*
Create a branch before making changes:
git checkout -b feature/my-featureUse clear commit messages.
Examples:
feat: add agent dashboard
fix: correct transaction status
docs: update architecture guide
test: add wallet integration tests
refactor: simplify blockchain service
A pull request should explain:
- What changed
- Why it changed
- How it was tested
- Any known limitations
- Any security implications
Developers must never commit:
- Private keys
- Seed phrases
- Passwords
- API secrets
- Database credentials
- Production credentials
If a secret is accidentally committed, treat it as compromised and rotate it immediately.
Before opening a PR:
[ ] Dependencies installed
[ ] Application runs
[ ] Tests pass
[ ] Lint passes
[ ] Type check passes
[ ] Production build succeeds
[ ] No secrets committed
[ ] Documentation updated
When something fails:
- Read the complete error.
- Check the repository README.
- Check environment variables.
- Check dependency versions.
- Check logs.
- Reproduce the issue.
- Search existing GitHub issues.
- Document the fix when appropriate.
Avoid repeatedly reinstalling dependencies without understanding the failure.
CeloHT development follows:
Build reproducibly. Test locally. Review carefully. Deploy deliberately.
Document: Developer Setup Version: 1.0 Project: CeloHT
© 2026 CeloHT - Open Source. Global Impact. Licensed under Apache.