Files
k1nq d582f15681 feat: add tests for import polling, login page, money utilities, and query keys
- Implemented tests for import polling functionality, ensuring correct behavior for active and terminal import statuses.
- Created tests for the login page, validating user interactions and error handling.
- Added unit tests for money utility functions, covering parsing, formatting, and summation of monetary values.
- Developed tests for query keys, ensuring proper scoping and invalidation roots.

chore: setup testing environment and configuration

- Added setup file for testing with Vitest and Testing Library.
- Configured TypeScript and Vite for the frontend project.
- Created Docker and Nginx configurations for local development and production environments.
- Established a PostgreSQL initialization script for setting up application roles.

docs: add README and environment configuration for infra

- Included README for the infra directory, detailing local development setup and service descriptions.
- Created an example environment configuration file for local development with placeholders for sensitive information.
2026-09-14 09:26:33 +05:00

55 lines
1.7 KiB
Nginx Configuration File

# Same-origin reverse proxy: serves the SPA and forwards /api/v1 to the API.
# TLS termination happens at the platform edge in production; locally this
# server is exposed on plain HTTP at 127.0.0.1:8080.
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Import uploads are capped at 20 MB by product rules; leave headroom.
client_max_body_size 25m;
# Baseline security headers. TLS/HSTS/CSP are configured at the platform
# edge (see docs/operations/beta-release-runbook.md).
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
gzip on;
gzip_min_length 1024;
gzip_types text/css application/javascript application/json image/svg+xml;
# Block dotfiles (except ACME challenges if ever needed).
location ~ /\. {
deny all;
}
# Reverse proxy to the FastAPI API. No URI part on proxy_pass, so the
# /api/v1 prefix is preserved end to end.
location /api/v1/ {
proxy_pass http://api:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Request-Id $request_id;
proxy_connect_timeout 5s;
proxy_read_timeout 60s;
}
# Hashed static assets are immutable.
location /assets/ {
access_log off;
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# SPA fallback for client-side routes.
location / {
try_files $uri $uri/ /index.html;
}
}