Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6bed45d
SETUP: basic scaffold
ptourlas Sep 11, 2025
39179ee
SETUP: test suite tweaks
ptourlas Sep 11, 2025
04527f2
SETUP: api client
ptourlas Sep 12, 2025
46159e2
SETUP: UI framework, query client, routing
ptourlas Sep 14, 2025
fb0c343
SETUP: basic scaffold
ptourlas Sep 14, 2025
e14bc5c
FIX: add breakpoint detection for columns and simplify image list
ptourlas Sep 14, 2025
100ed30
FIX: remove max width constraint
ptourlas Sep 14, 2025
54cd5bf
FIX: preserve fetched data in query cache
ptourlas Sep 14, 2025
75e0c87
FIX: Remove top "Load More" button
ptourlas Sep 14, 2025
11989ca
FIX: Change title wording
ptourlas Sep 14, 2025
f20c9cc
FEATURE: infinite scrolling for feed page
ptourlas Sep 14, 2025
75ab615
FIX: Extract image actions to separate component
ptourlas Sep 15, 2025
ddb19d3
FIX: extract breed info and actions, tweak for mobile-friendly view
ptourlas Sep 15, 2025
da0e0dc
FIX: mobile-friendly view for breed origin/temperament details
ptourlas Sep 15, 2025
2302085
FIX: Move Accessibility Link to a separate component
ptourlas Sep 16, 2025
557c58a
FIX: responsive navigation menu
ptourlas Sep 16, 2025
0c401aa
FIX: logo and wording alignment
ptourlas Sep 16, 2025
d709a10
FIX: Separate Footer component
ptourlas Sep 17, 2025
5ff0ce5
FIX: Separate retry button and sticky top section
ptourlas Sep 17, 2025
67c5e32
FIX: Restore container max width
ptourlas Sep 17, 2025
9ded204
FIX: Restore container max width
ptourlas Sep 17, 2025
3d169b4
FEATURE: add country flag to breed origin
ptourlas Sep 17, 2025
7cd0097
FEATURE: use breed origin to prepopulate breed search bar
ptourlas Sep 17, 2025
467eedc
FIX: dedupe random images
ptourlas Sep 18, 2025
f4826cd
SETUP: env file
ptourlas Sep 18, 2025
b9b156c
FIX: swap top "Load More" button with "Refresh"
ptourlas Sep 18, 2025
8ca35ef
FIX: breakpoint detection for columns
ptourlas Sep 18, 2025
329b4f1
SETUP: cloud run deployment
ptourlas Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
build
.git
.gitignore
Dockerfile
docker-compose.yml
.vscode
*.log
coverage
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_API_BASE="https://api.thecatapi.com/v1"
VITE_API_KEY="live_wk9wTd4Vt8sqvW6Br9U5ls6Nkf15oFtxYv2cdbOsQOAiaXSNHKaWNMYAVznjFzQg"
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# ---------- Build stage ----------
FROM node:lts-alpine AS build
WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci --no-audit --no-fund

ARG VITE_API_KEY
ENV VITE_API_KEY=${VITE_API_KEY}

# Copy the env file so Vite can read it
COPY .env ./

COPY . .
RUN npm run build

# ---------- Runtime stage ----------
FROM nginxinc/nginx-unprivileged:stable-alpine
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
15 changes: 15 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
REGION=$(gcloud config get-value run/region)
PROJECT_ID=$(gcloud config get-value project)
IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/pennylane-guinea-pig/pennylane-guinea-pig-2:$(date +%Y%m%d%H%M%S)

gcloud builds submit --tag $IMAGE

gcloud run deploy pennylane-guinea-pig \
--image $IMAGE \
--region $REGION \
--platform managed \
--allow-unauthenticated \
--port 8080 \
--memory 256Mi \
--cpu 1 \
--concurrency 80
23 changes: 23 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { globalIgnores } from 'eslint/config'

export default tseslint.config([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs['recommended-latest'],
reactRefresh.configs.vite,
],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
18 changes: 18 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
listen 8080;
server_name _;

root /usr/share/nginx/html;
index index.html;

# Serve files directly if they exist, otherwise fall back to index.html (SPA)
location / {
try_files $uri /index.html;
}

# Optional: tighter caching for static assets
location ~* \.(?:js|css|png|jpg|jpeg|gif|svg|ico)$ {
try_files $uri =404;
access_log off;
}
}
Loading