feat: Add comprehensive backend validation, toast notifications, and Tokyo Night theme
- Backend: Add server-side validation with go-playground/validator/v10 - Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast - UI: Complete Tokyo Night theme redesign with modern animations - Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements - Validation: Email format, password strength, and input sanitization - UX: Real-time error feedback, loading states, and responsive design
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# Build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Node.js and npm
|
||||
RUN apk add --no-cache nodejs npm
|
||||
|
||||
# Install sqlc
|
||||
RUN go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
|
||||
|
||||
|
||||
|
||||
# Copy backend source code
|
||||
COPY backend/ ./backend/
|
||||
|
||||
# Copy frontend source for building
|
||||
COPY frontend/package*.json ./frontend/
|
||||
WORKDIR /app/frontend
|
||||
|
||||
# Install frontend dependencies (cached if package.json unchanged)
|
||||
RUN npm ci
|
||||
|
||||
# Copy frontend source
|
||||
COPY frontend/ ./
|
||||
|
||||
# Build frontend
|
||||
RUN npm run build
|
||||
|
||||
# Go back to root
|
||||
WORKDIR /app
|
||||
|
||||
# Generate sqlc code
|
||||
RUN cd backend && sqlc generate
|
||||
|
||||
# Build the application
|
||||
RUN cd backend && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ../main ./cmd/server
|
||||
|
||||
# Final stage
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /root/
|
||||
|
||||
# Copy the binary from builder stage
|
||||
COPY --from=builder /app/main .
|
||||
|
||||
# Copy migrations (if needed for initialization)
|
||||
COPY --from=builder /app/backend/migrations ./migrations
|
||||
|
||||
# Copy static files
|
||||
COPY --from=builder /app/frontend/build ./static
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Run the binary
|
||||
CMD ["./main"]
|
||||
Reference in New Issue
Block a user