Skip to content

Commit 4ff8cdf

Browse files
authored
Merge pull request #11 from DoktorShift/deploy
MCP Server updates
2 parents 0b2c1af + a6f7d65 commit 4ff8cdf

File tree

3 files changed

+216
-369
lines changed

3 files changed

+216
-369
lines changed

docs/dev/contributing.md

Lines changed: 33 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -4,66 +4,33 @@
44
55
## Getting started
66

7+
Fork and clone the repo, then use `make dev` for a one-command setup:
8+
79
```bash
8-
# Fork and clone
910
git clone https://github.com/your-username/lnbits.git
1011
cd lnbits
11-
12-
# Install dependencies (uv preferred, Poetry also supported)
13-
uv venv && source .venv/bin/activate && uv pip install -e ".[dev]"
14-
# or: poetry install
15-
16-
# Set up for development
17-
cp .env.example .env
18-
19-
# Use FakeWallet for development
20-
echo "LNBITS_BACKEND_WALLET_CLASS=FakeWallet" >> .env
21-
22-
# Run in debug mode
23-
DEBUG=true lnbits
24-
# or: poetry run lnbits
25-
```
26-
27-
### Debian/Ubuntu dependencies
28-
29-
If building from source on Debian/Ubuntu, install system dependencies first:
30-
31-
```bash
32-
sudo apt install python3-dev libpq-dev build-essential
12+
make dev
3313
```
3414

35-
### Quick start with Make
15+
This installs dependencies, configures FakeWallet, and starts LNbits in debug mode.
3616

37-
```bash
38-
# One-command dev setup (installs, configures, and starts)
39-
make dev
40-
```
17+
::: tip Prefer manual setup?
18+
See the full installation guides for [uv](/guide/installation/uv), [Poetry](/guide/installation/poetry), or [Nix](/guide/installation/nix). Use [FakeWallet](/guide/wallets/fakewallet) for development - it simulates Lightning payments without a real node.
19+
:::
4120

4221
### Pre-commit hooks
4322

44-
Set up pre-commit hooks to catch issues before committing:
45-
4623
```bash
47-
# Install pre-commit hooks
4824
pre-commit install
49-
50-
# Run hooks manually on all files
5125
pre-commit run --all-files
5226
```
5327

5428
### LNbits CLI
5529

56-
LNbits includes a CLI tool for common operations:
57-
5830
```bash
59-
# See available commands
60-
lnbits-cli --help
61-
62-
# Run database migrations
63-
lnbits-cli migrate
64-
65-
# Create a superuser
66-
lnbits-cli superuser
31+
lnbits-cli --help # available commands
32+
lnbits-cli migrate # run database migrations
33+
lnbits-cli superuser # create a superuser
6734
```
6835

6936
## Development workflow
@@ -94,17 +61,7 @@ If your extension absolutely requires a new Python package whose needs are not m
9461

9562
1. **Check `pyproject.toml` first** - search for an existing package that covers your need
9663
2. **Open an issue** on GitHub explaining why the dependency is necessary and what alternatives you evaluated
97-
3. **Add the dependency** to `pyproject.toml`:
98-
99-
```bash
100-
# With Poetry
101-
poetry add package-name
102-
103-
# With uv
104-
uv pip install package-name
105-
# then manually add to pyproject.toml
106-
```
107-
64+
3. **Add the dependency** to `pyproject.toml`
10865
4. **Test compatibility across all supported installers:**
10966

11067
```bash
@@ -129,7 +86,7 @@ All three installation methods (uv, Poetry, Nix) must work. A PR that breaks any
12986
### What gets rejected
13087

13188
| Reason | Example |
132-
| --- | --- |
89+
|---|---|
13390
| Duplicate functionality | Adding `requests` when `httpx` is already available |
13491
| Heavy/bloated package | Adding a large framework for a small utility |
13592
| Unmaintained package | No releases or commits in 12+ months |
@@ -139,31 +96,21 @@ All three installation methods (uv, Poetry, Nix) must work. A PR that breaks any
13996
## Testing
14097

14198
```bash
142-
# Run all tests
143-
make test
99+
make test # run all tests
100+
make format # run formatting check
101+
make mypy # run type checking
102+
make all # format + lint + type check + tests
144103

145104
# Run specific test file
146-
poetry run pytest tests/test_wallets.py
147-
148-
# Run with verbose output
149-
poetry run pytest -v
150-
151-
# Run formatting check
152-
make format
153-
154-
# Run type checking
155-
make mypy
156-
157-
# Run all checks (format + lint + type check + tests)
158-
make all
105+
poetry run pytest tests/test_wallets.py -v
159106
```
160107

161108
Tests must pass on both SQLite and PostgreSQL.
162109

163110
## Project branches
164111

165112
| Branch | Purpose |
166-
| --- | --- |
113+
|---|---|
167114
| `main` | Stable releases |
168115
| `dev` | Active development (PR target) |
169116
| `feature/*` | Feature branches |
@@ -178,31 +125,21 @@ Found something broken? [Open an issue on GitHub](https://github.com/lnbits/lnbi
178125
- Relevant logs (mask any secrets, macaroons, or API keys!)
179126
- Steps to reproduce the issue
180127

181-
For extension bugs, open the issue on the extension's own repo (linked from each extension page).
128+
For extension bugs, open the issue on the extension's own repo (linked from each [extension page](/extensions/)).
182129

183130
## Contributing to documentation
184131

185-
This docs site pulls extension pages directly from each extension's GitHub repository. To improve an extension's documentation:
186-
187-
1. Go to the extension repo (e.g., `github.com/lnbits/tpos`)
188-
2. Edit the `README.md` there
189-
3. Your changes will appear on the docs site at the next build
132+
The docs site is a separate project. Extension pages are auto-generated from each extension's GitHub README at build time.
190133

191-
For core docs (guides, API reference, developer docs), submit a PR to the [docs repository](https://github.com/lnbits/lnbits-docs).
134+
**To improve an extension page:** Edit the `README.md` in the extension's own repo (e.g., `github.com/lnbits/tpos`). Changes appear on the docs site at the next build.
192135

193-
### Translations - great first contribution
136+
**To improve core docs:** Submit a PR to the [docs repository](https://github.com/DoktorShift/docs_lnbits). Pages are Markdown files in `docs/`.
194137

195-
LNbits is used worldwide. If you're a native speaker of a non-English language, helping with translations is one of the easiest and most impactful ways to contribute. No coding required - just language skills and a GitHub account.
138+
**Not sure where to start?** The [Contribute page](/contribute/) has role-specific guides for developers, testers, writers, designers, entrepreneurs, and ambassadors.
196139

197-
## Areas to contribute
140+
### Translations
198141

199-
- **Bug fixes** - check the [GitHub Issues](https://github.com/lnbits/lnbits/issues)
200-
- **Documentation** - improve extension READMEs or core docs (see above)
201-
- **Extensions** - build new extensions (see [Building Extensions](/dev/building-extensions))
202-
- **Wallet backends** - add support for new Lightning services
203-
- **Frontend** - UI improvements and accessibility
204-
- **Tests** - increase test coverage
205-
- **Translations** - help localize LNbits (great first contribution!)
142+
Translation infrastructure is being planned. If you're a native speaker of a non-English language and want to help shape how translations work, reach out on [Telegram](https://t.me/lnbits). Early volunteers will define the process.
206143

207144
## PR checklist
208145

@@ -221,7 +158,7 @@ LNbits is used worldwide. If you're a native speaker of a non-English language,
221158
Common CI/review rejection reasons:
222159

223160
| Code | Cause | Fix |
224-
| --- | --- | --- |
161+
|---|---|---|
225162
| `LINT_FAIL` | Ruff formatting errors | Run `make format` |
226163
| `TYPE_ERROR` | Missing type hints | Add type annotations |
227164
| `WRONG_BRANCH` | PR targets `main` | Rebase onto `dev` |
@@ -232,13 +169,16 @@ Common CI/review rejection reasons:
232169

233170
Join the LNbits Telegram group: [@lnbits](https://t.me/lnbits)
234171

235-
You can also reach the core team directly via the chat button on [lnbits.com](https://lnbits.com).
236-
237172
::: warning Scam warning
238173
LNbits admins will **never** DM you first. There is **no official LNbits support team** that contacts users privately. If someone messages you claiming to be LNbits support, it is a scam.
239174
:::
240175

241176
## Related Pages
242177

243-
- [Building Extensions](/dev/building-extensions)
244-
- [Architecture](/dev/architecture)
178+
- [Contribute to LNbits](/contribute/) - role-specific guides for all contributor types
179+
- [Building Extensions](/dev/building-extensions) - extension development guide
180+
- [Architecture](/dev/architecture) - internal structure and design decisions
181+
- [Developer Tools](/dev/tools) - Extension Builder, Polar, MCP Server, TableTown
182+
- [FakeWallet](/guide/wallets/fakewallet) - simulated Lightning backend for development
183+
- [Installation (uv)](/guide/installation/uv) - recommended from-source install
184+
- [Installation (Poetry)](/guide/installation/poetry) - alternative Python setup

0 commit comments

Comments
 (0)