3f8bc58ca9
Phase 1 — Core API (Go): - Events, guests, tokens, RSVPs CRUD on PostgreSQL via pgx/v5 - HMAC-signed per-guest tokens with format validation - Health endpoint with DB ping, slog JSON logging, graceful shutdown Phase 2 — NATS + Fraud Engine: - NATS JetStream pub/sub with explicit-ack consumers - Python/FastAPI fraud engine with heuristic risk scoring (fingerprint mismatch, IP change, missing signals, repeated access) - gRPC sync scoring with 250ms fail-open timeout - Per-guest baseline tracking; risk bands low/medium/high/block Phase 3 — Notifications + Frontend: - Notification worker scaffolding (Twilio/SES stubs, retry/backoff) - Nuxt 3 frontend with Tailwind dark theme + brand green - Live monitor via WebSocket with auto-reconnect - Activity history endpoint backfills monitor with RSVPs + scored access checks (including blocked attempts) UX polish: - Marketing-friendly landing page (hero mockup, how-it-works, features, use cases, testimonials, FAQ, final CTA) - Animated layered card mockups on landing + new-event page - Plus-ones stepper, RSVP status badges, filter buttons - Friendly access-check labels (Verified/Review/Suspicious/Blocked) - Dashboard hydration fix via ClientOnly wrapper Infrastructure: - docker-compose for full local dev (postgres, nats, api, fraud-engine, notifier, frontend) - Multi-stage Dockerfiles, non-root UID 1000 - Integration tests with testcontainers-go Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
122 lines
4.3 KiB
Go
122 lines
4.3 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc v6.31.1
|
|
// source: fraud/v1/fraud.proto
|
|
|
|
package fraudpb
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
FraudService_Score_FullMethodName = "/guestguard.fraud.v1.FraudService/Score"
|
|
)
|
|
|
|
// FraudServiceClient is the client API for FraudService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type FraudServiceClient interface {
|
|
Score(ctx context.Context, in *ScoreRequest, opts ...grpc.CallOption) (*ScoreResponse, error)
|
|
}
|
|
|
|
type fraudServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewFraudServiceClient(cc grpc.ClientConnInterface) FraudServiceClient {
|
|
return &fraudServiceClient{cc}
|
|
}
|
|
|
|
func (c *fraudServiceClient) Score(ctx context.Context, in *ScoreRequest, opts ...grpc.CallOption) (*ScoreResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ScoreResponse)
|
|
err := c.cc.Invoke(ctx, FraudService_Score_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// FraudServiceServer is the server API for FraudService service.
|
|
// All implementations must embed UnimplementedFraudServiceServer
|
|
// for forward compatibility.
|
|
type FraudServiceServer interface {
|
|
Score(context.Context, *ScoreRequest) (*ScoreResponse, error)
|
|
mustEmbedUnimplementedFraudServiceServer()
|
|
}
|
|
|
|
// UnimplementedFraudServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedFraudServiceServer struct{}
|
|
|
|
func (UnimplementedFraudServiceServer) Score(context.Context, *ScoreRequest) (*ScoreResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Score not implemented")
|
|
}
|
|
func (UnimplementedFraudServiceServer) mustEmbedUnimplementedFraudServiceServer() {}
|
|
func (UnimplementedFraudServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeFraudServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to FraudServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeFraudServiceServer interface {
|
|
mustEmbedUnimplementedFraudServiceServer()
|
|
}
|
|
|
|
func RegisterFraudServiceServer(s grpc.ServiceRegistrar, srv FraudServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedFraudServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&FraudService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _FraudService_Score_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ScoreRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(FraudServiceServer).Score(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: FraudService_Score_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(FraudServiceServer).Score(ctx, req.(*ScoreRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// FraudService_ServiceDesc is the grpc.ServiceDesc for FraudService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var FraudService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "guestguard.fraud.v1.FraudService",
|
|
HandlerType: (*FraudServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Score",
|
|
Handler: _FraudService_Score_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "fraud/v1/fraud.proto",
|
|
}
|