Skip to content

Commit 6a3b45b

Browse files
committed
Initial project setup with Rapina 0.5
0 parents  commit 6a3b45b

File tree

14 files changed

+4221
-0
lines changed

14 files changed

+4221
-0
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DATABASE_URL=postgres://reeverb:secret@localhost:5432/reeverb
2+
JWT_SECRET=change-me-in-production
3+
RUST_LOG=info
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help improve Reeverb
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear description of what the bug is.
11+
12+
**To reproduce**
13+
Steps to reproduce the behavior.
14+
15+
**Expected behavior**
16+
What you expected to happen.
17+
18+
**Environment**
19+
- Reeverb version:
20+
- Rust version:
21+
- OS:
22+
- Database:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a feature for Reeverb
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Problem**
10+
What problem does this solve?
11+
12+
**Proposed solution**
13+
How should it work?
14+
15+
**Alternatives considered**
16+
Any other approaches you've thought about.

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
check:
15+
name: Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: dtolnay/rust-toolchain@stable
20+
- uses: Swatinem/rust-cache@v2
21+
- run: cargo check
22+
23+
fmt:
24+
name: Format
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
with:
30+
components: rustfmt
31+
- run: cargo fmt --all -- --check
32+
33+
clippy:
34+
name: Clippy
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@stable
39+
with:
40+
components: clippy
41+
- uses: Swatinem/rust-cache@v2
42+
- run: cargo clippy -- -D warnings
43+
44+
test:
45+
name: Test
46+
runs-on: ubuntu-latest
47+
services:
48+
postgres:
49+
image: postgres:16-alpine
50+
env:
51+
POSTGRES_USER: reeverb
52+
POSTGRES_PASSWORD: secret
53+
POSTGRES_DB: reeverb_test
54+
ports:
55+
- 5432:5432
56+
options: >-
57+
--health-cmd pg_isready
58+
--health-interval 10s
59+
--health-timeout 5s
60+
--health-retries 5
61+
env:
62+
DATABASE_URL: postgres://reeverb:secret@localhost:5432/reeverb_test
63+
JWT_SECRET: test-secret
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: dtolnay/rust-toolchain@stable
67+
- uses: Swatinem/rust-cache@v2
68+
- run: cargo test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target
2+
.env
3+
*.db
4+
*.db-journal

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Contributing to Reeverb
2+
3+
Thanks for your interest in contributing. Here's how to get started.
4+
5+
## Setup
6+
7+
1. Fork the repo and clone your fork
8+
2. Install Rust 1.85+ via [rustup](https://rustup.rs)
9+
3. Install PostgreSQL 16+ (or use Docker: `docker compose up db -d`)
10+
4. Copy `.env.example` to `.env` and configure your database
11+
5. Run `cargo run` to start the server
12+
6. Run `cargo test` to run the test suite
13+
14+
## Pull Requests
15+
16+
- Keep PRs focused on a single change
17+
- Write tests for new functionality
18+
- Run `cargo clippy` and `cargo fmt` before submitting
19+
- Write clear commit messages (single line, imperative mood)
20+
21+
## Code Style
22+
23+
- Follow existing patterns in the codebase
24+
- Feature-first module structure (group by domain, not by layer)
25+
- Use Rapina conventions: `#[get]`, `#[post]`, `Validated<T>`, typed errors
26+
- Handlers: `list_users`, `create_user`, `get_user`
27+
- DTOs: `CreateUserRequest`, `UserResponse`
28+
- Routes: plural, versioned (`/v1/users/:id`)
29+
30+
## Issues
31+
32+
- Use GitHub Issues for bugs and feature requests
33+
- Include reproduction steps for bugs
34+
- Check existing issues before opening a new one
35+
36+
## License
37+
38+
By contributing, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)