Skip to content

Commit ad54394

Browse files
Merge pull request #291 from SimpleAccounts/feature/themed-auth-screens-restore
feat: restore modern themed auth screens with glassmorphism UI
2 parents 87fc1c2 + 4579d4d commit ad54394

322 files changed

Lines changed: 13786 additions & 16157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SimpleAccounts-UAE Development Container
2+
# Base image with Node 20 and Java 21 for full-stack development
3+
4+
FROM mcr.microsoft.com/devcontainers/java:21-bookworm
5+
6+
# Install Node.js 20
7+
ARG NODE_VERSION="20"
8+
RUN su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"
9+
10+
# Install additional system dependencies
11+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12+
&& apt-get -y install --no-install-recommends \
13+
postgresql-client \
14+
redis-tools \
15+
chromium \
16+
chromium-driver \
17+
fonts-liberation \
18+
libasound2 \
19+
libatk-bridge2.0-0 \
20+
libatk1.0-0 \
21+
libcups2 \
22+
libdbus-1-3 \
23+
libdrm2 \
24+
libgbm1 \
25+
libgtk-3-0 \
26+
libnspr4 \
27+
libnss3 \
28+
libx11-xcb1 \
29+
libxcomposite1 \
30+
libxdamage1 \
31+
libxfixes3 \
32+
libxrandr2 \
33+
xdg-utils \
34+
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
35+
36+
# Set Playwright to use system Chromium
37+
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
38+
ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium
39+
40+
# Install global npm packages
41+
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g npm@latest" 2>&1
42+
43+
# Pre-cache Maven dependencies (optional - speeds up first build)
44+
# Uncomment if you want to pre-download Maven dependencies
45+
# COPY apps/backend/pom.xml /tmp/pom.xml
46+
# RUN cd /tmp && mvn dependency:go-offline -B
47+
48+
# Set working directory
49+
WORKDIR /workspaces/SimpleAccounts-UAE
50+
51+
# Default command
52+
CMD ["sleep", "infinity"]

.devcontainer/devcontainer.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"name": "SimpleAccounts-UAE",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "devcontainer",
5+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6+
7+
// Features to add to the dev container
8+
"features": {
9+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
10+
"moby": true,
11+
"installDockerBuildx": true
12+
},
13+
"ghcr.io/devcontainers/features/git:1": {
14+
"ppa": true,
15+
"version": "latest"
16+
},
17+
"ghcr.io/devcontainers/features/github-cli:1": {}
18+
},
19+
20+
// Configure tool-specific properties
21+
"customizations": {
22+
"vscode": {
23+
"extensions": [
24+
// Java Development
25+
"vscjava.vscode-java-pack",
26+
"vmware.vscode-spring-boot",
27+
"vscjava.vscode-spring-initializr",
28+
"vscjava.vscode-spring-boot-dashboard",
29+
30+
// Frontend Development
31+
"dbaeumer.vscode-eslint",
32+
"esbenp.prettier-vscode",
33+
"bradlc.vscode-tailwindcss",
34+
"ms-vscode.vscode-typescript-next",
35+
36+
// Testing
37+
"ms-playwright.playwright",
38+
39+
// Database
40+
"cweijan.vscode-postgresql-client2",
41+
42+
// Git & Collaboration
43+
"eamodio.gitlens",
44+
"github.copilot",
45+
46+
// General
47+
"editorconfig.editorconfig",
48+
"usernamehw.errorlens",
49+
"christian-kohler.path-intellisense"
50+
],
51+
"settings": {
52+
// Java settings
53+
"java.server.launchMode": "Standard",
54+
"java.configuration.updateBuildConfiguration": "automatic",
55+
"java.compile.nullAnalysis.mode": "automatic",
56+
57+
// Editor settings
58+
"editor.formatOnSave": true,
59+
"editor.defaultFormatter": "esbenp.prettier-vscode",
60+
"[java]": {
61+
"editor.defaultFormatter": "redhat.java"
62+
},
63+
64+
// Terminal settings
65+
"terminal.integrated.defaultProfile.linux": "bash",
66+
67+
// File associations
68+
"files.associations": {
69+
"*.env*": "dotenv"
70+
}
71+
}
72+
}
73+
},
74+
75+
// Port forwarding
76+
"forwardPorts": [3000, 8080, 5432, 6379],
77+
"portsAttributes": {
78+
"3000": { "label": "Frontend (Vite)", "onAutoForward": "notify" },
79+
"8080": { "label": "Backend (Spring Boot)", "onAutoForward": "notify" },
80+
"5432": { "label": "PostgreSQL", "onAutoForward": "silent" },
81+
"6379": { "label": "Redis", "onAutoForward": "silent" }
82+
},
83+
84+
// Lifecycle scripts
85+
"postCreateCommand": "bash .devcontainer/post-create.sh",
86+
"postStartCommand": "bash .devcontainer/post-start.sh",
87+
88+
// Environment variables
89+
"containerEnv": {
90+
"PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD": "1",
91+
"PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH": "/usr/bin/chromium"
92+
},
93+
94+
// Run as non-root user
95+
"remoteUser": "vscode"
96+
}

.devcontainer/docker-compose.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
version: '3.8'
2+
3+
services:
4+
devcontainer:
5+
build:
6+
context: ..
7+
dockerfile: .devcontainer/Dockerfile
8+
volumes:
9+
- ..:/workspaces/SimpleAccounts-UAE:cached
10+
- devcontainer-vscode-extensions:/home/vscode/.vscode-server/extensions
11+
- devcontainer-maven-cache:/home/vscode/.m2
12+
- devcontainer-npm-cache:/home/vscode/.npm
13+
command: sleep infinity
14+
network_mode: service:db
15+
depends_on:
16+
- db
17+
- redis
18+
19+
db:
20+
image: postgres:16-alpine
21+
restart: unless-stopped
22+
volumes:
23+
- postgres-data:/var/lib/postgresql/data
24+
- ./init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
25+
environment:
26+
POSTGRES_USER: simpleaccounts
27+
POSTGRES_PASSWORD: simpleaccounts_dev
28+
POSTGRES_DB: simpleaccounts
29+
healthcheck:
30+
test: ['CMD-SHELL', 'pg_isready -U simpleaccounts']
31+
interval: 10s
32+
timeout: 5s
33+
retries: 5
34+
35+
redis:
36+
image: redis:7-alpine
37+
restart: unless-stopped
38+
volumes:
39+
- redis-data:/data
40+
command: redis-server --appendonly yes
41+
network_mode: service:db
42+
43+
volumes:
44+
postgres-data:
45+
redis-data:
46+
devcontainer-vscode-extensions:
47+
devcontainer-maven-cache:
48+
devcontainer-npm-cache:

.devcontainer/init-db.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- Initialize SimpleAccounts development database
2+
-- This script runs automatically when the PostgreSQL container starts for the first time
3+
4+
-- Create additional databases for testing
5+
CREATE DATABASE simpleaccounts_test;
6+
7+
-- Grant privileges
8+
GRANT ALL PRIVILEGES ON DATABASE simpleaccounts TO simpleaccounts;
9+
GRANT ALL PRIVILEGES ON DATABASE simpleaccounts_test TO simpleaccounts;
10+
11+
-- Enable useful extensions
12+
\c simpleaccounts;
13+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
14+
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
15+
16+
\c simpleaccounts_test;
17+
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
18+
CREATE EXTENSION IF NOT EXISTS "pgcrypto";

.devcontainer/post-create.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/bin/bash
2+
# Post-create script - runs once when the container is created
3+
4+
set -e
5+
6+
echo "🚀 Setting up SimpleAccounts-UAE development environment..."
7+
8+
# Install root dependencies
9+
echo "📦 Installing root npm dependencies..."
10+
npm install
11+
12+
# Install frontend dependencies
13+
echo "📦 Installing frontend dependencies..."
14+
cd apps/frontend
15+
npm install --legacy-peer-deps
16+
cd ../..
17+
18+
# Install Playwright browsers (using system Chromium)
19+
echo "🎭 Setting up Playwright..."
20+
cd apps/frontend
21+
npx playwright install-deps 2>/dev/null || true
22+
cd ../..
23+
24+
# Download Maven dependencies (this can take a while on first run)
25+
echo "☕ Downloading Maven dependencies..."
26+
cd apps/backend
27+
if [ -f "./mvnw" ]; then
28+
chmod +x ./mvnw
29+
./mvnw dependency:go-offline -B -q || true
30+
else
31+
mvn dependency:go-offline -B -q || true
32+
fi
33+
cd ../..
34+
35+
# Setup git hooks
36+
echo "🪝 Setting up git hooks..."
37+
npm run prepare 2>/dev/null || true
38+
39+
# Create local environment files if they don't exist
40+
if [ ! -f "apps/frontend/.env.local" ]; then
41+
echo "📝 Creating frontend .env.local..."
42+
cat > apps/frontend/.env.local << 'EOF'
43+
VITE_API_URL=http://localhost:8080
44+
VITE_APP_ENV=development
45+
EOF
46+
fi
47+
48+
if [ ! -f "apps/backend/src/main/resources/application-local.properties" ]; then
49+
echo "📝 Creating backend application-local.properties..."
50+
cat > apps/backend/src/main/resources/application-local.properties << 'EOF'
51+
# Local development configuration
52+
spring.datasource.url=jdbc:postgresql://localhost:5432/simpleaccounts
53+
spring.datasource.username=simpleaccounts
54+
spring.datasource.password=simpleaccounts_dev
55+
spring.jpa.hibernate.ddl-auto=update
56+
spring.redis.host=localhost
57+
spring.redis.port=6379
58+
EOF
59+
fi
60+
61+
echo "✅ Development environment setup complete!"
62+
echo ""
63+
echo "Quick start commands:"
64+
echo " Frontend: npm run frontend"
65+
echo " Backend: npm run backend:run"
66+
echo " Tests: npm test"

.devcontainer/post-start.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
# Post-start script - runs every time the container starts
3+
4+
echo "🔄 Starting SimpleAccounts-UAE development environment..."
5+
6+
# Wait for PostgreSQL to be ready
7+
echo "⏳ Waiting for PostgreSQL..."
8+
until pg_isready -h localhost -p 5432 -U simpleaccounts -q; do
9+
sleep 1
10+
done
11+
echo "✅ PostgreSQL is ready"
12+
13+
# Wait for Redis to be ready
14+
echo "⏳ Waiting for Redis..."
15+
until redis-cli -h localhost ping > /dev/null 2>&1; do
16+
sleep 1
17+
done
18+
echo "✅ Redis is ready"
19+
20+
echo ""
21+
echo "🎉 Development environment is ready!"
22+
echo ""
23+
echo "Database connection:"
24+
echo " Host: localhost"
25+
echo " Port: 5432"
26+
echo " User: simpleaccounts"
27+
echo " Pass: simpleaccounts_dev"
28+
echo " DB: simpleaccounts"
29+
echo ""
30+
echo "Redis connection:"
31+
echo " Host: localhost"
32+
echo " Port: 6379"

0 commit comments

Comments
 (0)