Skip to content

Commit 883bc8e

Browse files
committed
feat: initial public release of SuperAPI template
1 parent 82d59b9 commit 883bc8e

210 files changed

Lines changed: 14134 additions & 2803 deletions

File tree

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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SuperAPI environment example
2+
# Copy this to .env and choose one mode.
3+
4+
# ==========================================
5+
# MODE A: Minimal mode (no Postgres/Redis/Auth)
6+
# ==========================================
7+
# APP_PROFILE=minimal
8+
# APP_ENV=dev
9+
# HTTP_ADDR=:8080
10+
11+
# ==========================================
12+
# MODE B: Full mode (Postgres + Redis + Auth)
13+
# ==========================================
14+
APP_PROFILE=dev
15+
APP_ENV=dev
16+
HTTP_ADDR=:8080
17+
18+
POSTGRES_ENABLED=true
19+
POSTGRES_URL=postgres://superapi:superapi@127.0.0.1:5432/superapi?sslmode=disable
20+
21+
REDIS_ENABLED=true
22+
REDIS_ADDR=127.0.0.1:6379
23+
24+
AUTH_ENABLED=true
25+
AUTH_MODE=hybrid
26+
27+
RATELIMIT_ENABLED=true
28+
RATELIMIT_FAIL_OPEN=true
29+
30+
CACHE_ENABLED=true
31+
CACHE_FAIL_OPEN=true
32+
33+
# Optional production hardening (recommended in prod only)
34+
# METRICS_ENABLED=true
35+
# METRICS_AUTH_TOKEN=replace-with-strong-token
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: General discussion
2+
description: Start a design, architecture, or governance discussion.
3+
title: "discussion: "
4+
labels:
5+
- discussion
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Start a design or governance discussion. Keep scope explicit and actionable.
11+
- type: textarea
12+
id: context
13+
attributes:
14+
label: Context
15+
description: What are you trying to decide or improve?
16+
placeholder: We need to decide ...
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: options
21+
attributes:
22+
label: Options
23+
description: List candidate options and tradeoffs.
24+
placeholder: |
25+
Option A: ...
26+
Option B: ...
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: decision
31+
attributes:
32+
label: Decision criteria
33+
description: What constraints should drive the decision?
34+
placeholder: Security impact, backward compatibility, hot-path overhead ...
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Bug report
2+
description: Report a reproducible defect in SuperAPI.
3+
title: "bug: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for reporting a bug. Please provide enough detail to reproduce it reliably.
11+
- type: textarea
12+
id: steps
13+
attributes:
14+
label: Steps to reproduce
15+
description: Exact sequence of actions to trigger the issue.
16+
placeholder: |
17+
1. Set env vars ...
18+
2. Run command ...
19+
3. Call endpoint ...
20+
validations:
21+
required: true
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: Expected behavior
26+
description: What should have happened.
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: actual
31+
attributes:
32+
label: Actual behavior
33+
description: What actually happened. Include logs/errors if available.
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: env
38+
attributes:
39+
label: Environment
40+
description: Go version, OS, profile/mode, and dependency versions.
41+
placeholder: |
42+
Go 1.26
43+
OS: linux/amd64
44+
APP_PROFILE=dev
45+
Redis 7.x
46+
Postgres 15.x

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Security report
4+
url: https://github.com/MrEthical07/superapi/security/advisories/new
5+
about: Please report security vulnerabilities privately.
6+
- name: Discussions
7+
url: https://github.com/MrEthical07/superapi/discussions
8+
about: Use Discussions for design and usage questions.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature request
2+
description: Propose an improvement or new capability.
3+
title: "feat: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Please describe the problem first, then the proposed solution.
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem
15+
description: What user/developer pain point are you trying to solve?
16+
placeholder: The current behavior makes it hard to ...
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: proposed
21+
attributes:
22+
label: Proposed solution
23+
description: What change do you want?
24+
placeholder: Add a module-level policy option that ...
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: alternatives
29+
attributes:
30+
label: Alternatives considered
31+
description: Any alternatives or workarounds you evaluated?
32+
- type: textarea
33+
id: impact
34+
attributes:
35+
label: Impact and compatibility
36+
description: Note any API or behavior changes and whether this is breaking.
37+
placeholder: Non-breaking / Breaking with migration plan ...

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,22 @@ jobs:
3333
| sh -s -- -b $(go env GOPATH)/bin v1.64.6
3434
3535
- name: Lint
36-
run: golangci-lint run
36+
run: golangci-lint run
37+
38+
- name: Install govulncheck
39+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
40+
41+
- name: Vulnerability scan
42+
run: govulncheck ./...
43+
44+
- name: Install CycloneDX SBOM tool
45+
run: go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
46+
47+
- name: Generate SBOM
48+
run: cyclonedx-gomod mod -licenses -json -output sbom.cdx.json
49+
50+
- name: Upload SBOM artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: sbom-cyclonedx
54+
path: sbom.cdx.json

.gitignore

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,28 @@ profile.cov
2424
go.work
2525
go.work.sum
2626

27-
# env file
27+
# Environment files
2828
.env
29+
.env.*
30+
!.env.example
31+
32+
# Logs and diagnostics
33+
*.log
34+
logs/
35+
tmp/
36+
*.tmp
37+
38+
# Build artifacts
39+
bin/
40+
build/
41+
dist/
42+
coverage/
43+
*.prof
44+
*.pprof
45+
46+
# Performance test artifacts
47+
performance/results/
2948

3049
# Editor/IDE
3150
# .idea/
32-
# .vscode/
51+
.vscode/

0 commit comments

Comments
 (0)