Skip to content

Commit 9fd745a

Browse files
committed
first commit
0 parents  commit 9fd745a

86 files changed

Lines changed: 9981 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# ---- Database ----
2+
DATABASE_URL=postgres://waitless:waitless123@localhost:5432/waitless?sslmode=disable
3+
4+
# Set to "true" to enable SQL query logging
5+
DB_DEBUG=false
6+
7+
# ---- Server ----
8+
PORT=8070
9+
10+
# ---- Security ----
11+
# Used for AES-256 encryption of SMTP passwords + session signing (min 32 chars)
12+
SESSION_SECRET=waitless-dev-key-change-me-32!!
13+
14+
# Set to "true" in production for Secure cookie flag
15+
COOKIE_SECURE=false
16+
17+
# Comma-separated allowed origins (default: * in dev)
18+
# ALLOWED_ORIGINS=https://yourdomain.com
19+
20+
# ---- Logging ----
21+
# LOG_LEVEL=debug
22+
# LOG_FORMAT=json (auto in production via GO_ENV=production)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug
4+
---
5+
6+
**Describe the bug**
7+
A clear description of what happened.
8+
9+
**To Reproduce**
10+
Steps to reproduce the behavior.
11+
12+
**Expected behavior**
13+
What you expected to happen.
14+
15+
**Environment**
16+
- OS:
17+
- Go version:
18+
- Bun version:
19+
- Browser:

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
backend:
11+
name: Go Backend
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.25'
18+
cache-dependency-path: backend/go.sum
19+
- name: Build
20+
run: cd backend && go build ./...
21+
- name: Test
22+
run: cd backend && go test ./...
23+
- name: Vet
24+
run: cd backend && go vet ./...
25+
26+
frontend:
27+
name: Frontend
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: oven-sh/setup-bun@v2
32+
with:
33+
bun-version: latest
34+
- name: Install
35+
run: cd frontend && bun install --frozen-lockfile
36+
- name: Build
37+
run: cd frontend && bun run build
38+
- name: Test
39+
run: cd frontend && bun run test

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Binaries
2+
waitless
3+
*.exe
4+
5+
# Dependencies
6+
frontend/node_modules/
7+
frontend/dist/
8+
backend/cmd/server/dist/
9+
10+
# Environment
11+
.env
12+
.env.local
13+
.env.production
14+
15+
# IDE
16+
.vscode/
17+
.idea/
18+
*.swp
19+
*.swo
20+
*~
21+
22+
# OS
23+
.DS_Store
24+
Thumbs.db
25+
26+
# Logs
27+
*.log
28+
29+
# Build
30+
/dist/
31+
/tmp/

CONTRIBUTING.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributing to Waitless
2+
3+
Thanks for your interest in contributing! Here's how to get started.
4+
5+
## Development Setup
6+
7+
### Prerequisites
8+
- Go 1.25+
9+
- Bun 1.2+
10+
- PostgreSQL 16+
11+
12+
### Quick Start
13+
14+
```bash
15+
git clone https://github.com/waitless/waitless
16+
cd waitless
17+
18+
# Configure
19+
cp .env.example .env
20+
# Edit .env with your local database credentials
21+
22+
# Backend
23+
cd backend && go mod download
24+
25+
# Frontend
26+
cd ../frontend && bun install
27+
28+
# Run both dev servers
29+
make dev-backend # Terminal 1
30+
make dev-frontend # Terminal 2
31+
```
32+
33+
## Project Structure
34+
35+
```
36+
waitless/
37+
├── backend/ # Go API server
38+
│ ├── cmd/server/ # Main entrypoint
39+
│ └── internal/ # Business logic
40+
│ ├── api/ # HTTP handlers
41+
│ ├── database/ # Database connection
42+
│ ├── middleware/ # Auth, security, rate limiting
43+
│ ├── models/ # GORM data models
44+
│ └── services/ # Email, crypto, validation
45+
├── frontend/ # TanStack Start + React
46+
│ └── src/
47+
│ ├── routes/ # File-based routing
48+
│ └── lib/ # API client, utilities
49+
└── docker/ # Dockerfile + compose
50+
```
51+
52+
## Making Changes
53+
54+
1. **Fork the repo** and create a branch from `main`
55+
2. **Write your code** — follow existing patterns
56+
3. **Test your changes**`make test`
57+
4. **Submit a PR** — describe what you changed and why
58+
59+
## Code Style
60+
61+
- **Go**: `gofmt` + `go vet`
62+
- **TypeScript**: Standard TypeScript, no semicolons in JSX
63+
- **CSS**: Vanilla CSS with design tokens
64+
65+
## What to Contribute
66+
67+
- 🐛 Bug fixes
68+
- 📖 Documentation improvements
69+
- 🌐 Translations
70+
- 🧩 New integrations
71+
- ✅ Tests
72+
- 🎨 UI improvements
73+
74+
## Reporting Issues
75+
76+
Use GitHub Issues. Include:
77+
- Steps to reproduce
78+
- Expected vs actual behavior
79+
- Environment details (Go version, OS, browser)
80+
81+
## License
82+
83+
By contributing, you agree your contributions will be licensed under the MIT License.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Waitless Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.PHONY: dev dev-backend dev-frontend build run kill clean install test
2+
3+
# Production — kill, clean build, run single binary
4+
run: kill clean build
5+
@nohup ./waitless > /tmp/waitless.log 2>&1 & echo "✅ Waitless running (PID $$!)"
6+
@sleep 1
7+
@tail -5 /tmp/waitless.log
8+
9+
# Build production binary
10+
build:
11+
@echo "Building frontend..."
12+
@cd frontend && bun run build
13+
@echo "Copying dist to backend embed..."
14+
@rm -rf backend/cmd/server/dist
15+
@cp -r frontend/dist backend/cmd/server/dist
16+
@echo "Building Go binary..."
17+
@cd backend && CGO_ENABLED=0 go build -ldflags="-s -w" -o ../waitless ./cmd/server
18+
@echo "✅ Built: ./waitless"
19+
20+
# Development — runs both backend + frontend
21+
dev:
22+
@echo "Starting Waitless dev mode..."
23+
@make -j2 dev-backend dev-frontend
24+
25+
dev-backend:
26+
cd backend && go run ./cmd/server
27+
28+
dev-frontend:
29+
cd frontend && bun run dev
30+
31+
# Kill any running waitless server
32+
kill:
33+
@-lsof -ti:8070 | xargs kill -9 2>/dev/null || true
34+
@sleep 0.5
35+
36+
# Clean
37+
clean:
38+
@rm -rf waitless frontend/dist backend/cmd/server/dist
39+
40+
# Logs
41+
logs:
42+
@tail -f /tmp/waitless.log
43+
44+
# Install dependencies
45+
install:
46+
cd frontend && bun install
47+
cd backend && go mod download
48+
49+
# Run tests
50+
test:
51+
cd backend && go test ./...

0 commit comments

Comments
 (0)