diff --git a/cmd/api/main.go b/cmd/api/main.go index c5357ee..81e4715 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -15,7 +15,6 @@ import ( "abuse_registration_poc/internal/store" ) -// Version is injected by Taskfile through -ldflags. var Version = "dev" func main() { @@ -60,7 +59,7 @@ func main() { ReadHeaderTimeout: 5 * time.Second, } - log.Printf("starting Abuse Registration POC on port %s", cfg.API.Port) + log.Printf("starting go api on port %s", cfg.API.Port) time.Sleep(100 * time.Millisecond) if err := server.ListenAndServe(); err != nil { log.Fatalf("ERROR: Failed to start server: %v", err) diff --git a/docs/data-model.md b/docs/data-model.md deleted file mode 100644 index 5df3f65..0000000 --- a/docs/data-model.md +++ /dev/null @@ -1,24 +0,0 @@ -# Data model - -This POC intentionally uses a very small anonymous registration object. - -```json -{ - "id": "bb8d39a6-8fef-48af-9f9c-27a41c8f8baf", - "registered_at": "1989-04-13T15:22:00Z", - "gender": "female", - "location": "Tórshavn", - "abuse_type": "psychological", - "status": "new" -} -``` - -Notes: - -- `id` is a UUID string generated by the server. -- There is no name field. -- `registered_at` defaults to `time.Now().UTC()` when omitted on create or update. -- Base synthetic data uses dates from 1988 through 1991. -- Data resets to 546 base rows every 10 minutes. -- `location` must be one of the fixed Faroese towns/villages in `internal/models/registration.go`. -- `PUT /api/v1/registrations/{uuid}` is used for update. There is no `PATCH` endpoint. diff --git a/internal/config/config.go b/internal/config/config.go index bf632b5..85510b0 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -14,8 +14,6 @@ const ( DefaultDatasetSize = 546 ) -// ApiKey mirrors the original API's JWT utility style: utils.GenerateToken and -// utils.VerifyToken read the signing secret from config. var ApiKey = DefaultJWTSecret type Config struct { diff --git a/internal/models/registration.go b/internal/models/registration.go index db401fc..c5de3c9 100644 --- a/internal/models/registration.go +++ b/internal/models/registration.go @@ -26,7 +26,6 @@ var AbuseCategories = []string{ var Genders = []string{"female", "male", "non_binary", "unknown"} var Statuses = []string{"new", "open", "referred", "closed"} -// FaroeLocations is the fixed set of accepted location values for this POC. var FaroeLocations = []string{ "Akrar", "Argir", "Ánirnar", "Árnafjørður", "Bøur", "Dalur", "Depil", "Eiði", "Elduvík", "Fámjin", "Froðba", "Fuglafjørður", "Funningsfjørður", "Funningur", diff --git a/internal/web/web.go b/internal/web/web.go index cc91b8c..6533682 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -5,15 +5,9 @@ import ( "io/fs" ) -// Templates contains all server-rendered HTML templates. -// //go:embed templates/index.html var Templates embed.FS -// Assets contains every browser asset needed by the POC page. -// The production binary serves these files from memory, so the server does not -// depend on a static/ directory beside the executable. -// //go:embed static/* static/css/* static/js/* favicon.ico var Assets embed.FS diff --git a/local/go-api/go-api b/local/go-api/go-api new file mode 100755 index 0000000..fdde2cc Binary files /dev/null and b/local/go-api/go-api differ