Initial commit: Custom Start Page application with authentication and DynamoDB storage

This commit is contained in:
2026-02-18 22:06:43 -05:00
commit 7175ff14ba
47 changed files with 7592 additions and 0 deletions

33
cmd/init-db/main.go Normal file
View File

@@ -0,0 +1,33 @@
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"custom-start-page/internal/storage"
)
func main() {
endpoint := flag.String("endpoint", "http://localhost:8000", "DynamoDB endpoint")
flag.Parse()
ctx := context.Background()
log.Printf("Connecting to DynamoDB at %s...", *endpoint)
db, err := storage.NewDynamoDBClient(ctx, *endpoint)
if err != nil {
log.Fatalf("Failed to create DynamoDB client: %v", err)
}
log.Println("Creating Users table...")
if err := db.CreateUsersTable(ctx); err != nil {
log.Fatalf("Failed to create Users table: %v", err)
}
log.Println("✓ Users table created successfully")
fmt.Println("\nDatabase initialization complete!")
os.Exit(0)
}