https://github.com/peterkyle01/create-neon-api
A beautiful CLI tool to bootstrap clean, production-ready Rust backend projects with JWT authentication and Neon PostgreSQL database integration.
https://github.com/peterkyle01/create-neon-api
git rust
Last synced: about 2 months ago
JSON representation
A beautiful CLI tool to bootstrap clean, production-ready Rust backend projects with JWT authentication and Neon PostgreSQL database integration.
- Host: GitHub
- URL: https://github.com/peterkyle01/create-neon-api
- Owner: peterkyle01
- License: mit
- Created: 2025-08-29T13:26:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-05-14T17:26:26.000Z (about 2 months ago)
- Last Synced: 2026-05-14T19:33:49.690Z (about 2 months ago)
- Topics: git, rust
- Language: Rust
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# create-neon-api
[](https://crates.io/crates/create-neon-api)
[](https://opensource.org/licenses/MIT)
Scaffold a Rust backend wired for the Neon Data API in a single command —
no network needed, the template is embedded in the binary.
The generated project includes JWT authentication (compatible with PostgREST
Row-Level Security), Argon2id password hashing, and an HTTP client pre-configured
for the Neon Data API. No ORM, no Docker, no connection pools — just HTTP to
your serverless Postgres.
## Install
```bash
cargo install create-neon-api
```
## Usage
```bash
create-neon-api # interactive prompt
create-neon-api my-api # scaffold directly
create-neon-api my-api -B # skip cargo build
create-neon-api my-api -q # quiet (scripts / CI)
```
## What you get
```
my-api/
├── src/
│ ├── main.rs # Axum server, routes
│ ├── config.rs # env-based configuration
│ ├── auth.rs # JWT + Argon2id
│ ├── data_api.rs # Neon Data API HTTP client
│ ├── errors.rs # unified error type
│ ├── models.rs # request / response types
│ ├── handlers/ # signup, login, me
│ └── middleware/ # JWT verification
├── migrations/ # SQL schema + RLS policies
├── Cargo.toml
├── justfile
├── .env.example
└── LICENSE
```
## After scaffolding
```bash
cd your-project
cp .env.example .env # add your Neon credentials
# run migrations/schema.sql in the Neon SQL Editor
cargo run # → http://localhost:8080
```
## Endpoints
| Method | Path | Auth | Description |
| ------ | --------- | ------ | ------------ |
| GET | /health | public | health check |
| POST | /signup | public | create user |
| POST | /login | public | get JWT |
| GET | /me | Bearer | user profile |
## License
MIT — see [LICENSE](LICENSE).