https://github.com/brainless/am.plify.app
Find early adopters who need your product through your browser (Reddit, HN, X...)
https://github.com/brainless/am.plify.app
Last synced: 9 days ago
JSON representation
Find early adopters who need your product through your browser (Reddit, HN, X...)
- Host: GitHub
- URL: https://github.com/brainless/am.plify.app
- Owner: brainless
- License: mit
- Created: 2026-04-29T03:08:57.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-01T15:43:46.000Z (about 1 month ago)
- Last Synced: 2026-05-01T17:28:46.394Z (about 1 month ago)
- Language: Rust
- Size: 25.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Amplify for Founders Template
Minimal fullstack template for typed feature development with coding agents.
## Stack
- Rust + Actix Web (`backend`)
- Rust shared types with TypeScript generation (`shared-types`)
- TypeScript + SolidJS + Solid Router + Tailwind + DaisyUI (`gui`, `admin-gui`)
- Bash scripts for server setup and deploy (`scripts`)
## Name Configuration
This template uses one config at project root:
- `project.conf`
Start by copying:
```bash
cp project.conf.template project.conf
```
Set at minimum:
- `PROJECT_NAME`
- `PROJECT_TITLE`
- `DB_KIND` (`sqlite` or `postgres`)
- `DATABASE_URL` (required for postgres; optional for sqlite)
- `SERVER_IP`
- `SSH_USER`
- `DOMAIN_NAME`
- `LETSENCRYPT_EMAIL`
Then apply naming across crate/package/docs:
```bash
scripts/init-project.sh
```
`init-project.sh` also sets the backend default Cargo feature based on `DB_KIND`:
- `sqlite` -> `db-sqlite`
- `postgres` -> `db-postgres`
## What This Template Includes
- `GET /api/heartbeat` in backend
- Embedded DB schema migrations via dedicated backend migrate binary
- Shared `HeartbeatResponse` type defined in Rust
- Generated TypeScript type consumed by GUI
- `gui`: Hello World + heartbeat status
- `admin-gui`: Hello World admin placeholder
- `systemd` service template for backend
- `nginx` site template for GUI + `/api` reverse proxy
- certbot setup flow for TLS certificates
- pre-commit hook for Rust and frontend checks
- auth starter schema: `users`, `user_profiles`, `user_roles` tables in `backend/migrations`
## Project Layout
- `backend/`: Actix API crate
- `shared-types/`: canonical API types + TS generator
- `gui/`: main SolidJS app
- `admin-gui/`: admin SolidJS app
- `scripts/`: setup, init, deploy, and server config templates
- `scripts/init-project.sh`
- `scripts/setup-server.sh`
- `scripts/deploy.sh`
- `scripts/configs/backend.service.template`
- `scripts/configs/nginx.conf.template`
- `scripts/configs/nginx-temp-cert.conf.template`
## Local Run
1. Generate TypeScript API types:
```bash
cargo run -p shared-types --bin generate_api_types
```
2. Run backend:
```bash
cargo run -p amplify-backend --bin migrate
cargo run -p amplify-backend
```
`DATABASE_URL` is read from environment first, then `project.conf`.
3. Run main GUI:
```bash
cd gui
npm install
npm run dev
```
4. Run admin GUI:
```bash
cd admin-gui
npm install
npm run dev
```
Open:
- main GUI: `http://127.0.0.1:3030`
- admin GUI: `http://127.0.0.1:3031`
## Git Hooks
Install repository-managed hooks:
```bash
scripts/install-git-hooks.sh
```
Pre-commit checks:
- `cargo fmt --all --check`
- `cargo check --workspace`
- `cargo test --workspace`
- `gui`: `prettier --check .` and `npm run build`
- `admin-gui`: `prettier --check .` and `npm run build`
## Deploy Pattern
1. `scripts/setup-server.sh`
2. `scripts/deploy.sh`
Both scripts read `project.conf` by default. You can pass a custom config path if needed.
`deploy.sh` uploads full source via `scp`, builds backend on server, runs migrations using the migrate binary, installs `systemd` and `nginx` config, and keeps certbot renew timer enabled.
## Development Model
Read `DEVELOP.md` for the type-driven feature workflow.