Interactive SSR website built with React, Webpack, Redis caching, HTTPS local development, and Tauri desktop support.
- React
- Webpack
- Node.js SSR
- Redis
- Docker
- AWS EC2
- Nginx
- Let's Encrypt
- Tauri v2
- Yarn Berry (v4)
Required version:
>=22.0.0
Recommended:
node v26.1.0
npm 11.11.0
yarn 4.13.0
Verify versions:
node -v
npm -v
yarn -vEnable Corepack:
npm install -g corepack
corepack enableActivate Yarn:
corepack prepare yarn@4.13.0 --activateVerify:
yarn -vyarn installDevelopment mode requires local HTTPS certificates generated with mkcert.
Install NSS tools:
sudo apt install libnss3-toolsInstall mkcert:
curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
chmod +x mkcert-v*-linux-amd64
sudo mv mkcert-v*-linux-amd64 /usr/local/bin/mkcertbrew install mkcertmkcert -installyarn certsExpected files:
certs/
├── localhost+2-key.pem
└── localhost+2.pem
Run the SSR development server with HTTPS and HMR:
yarn devApplication URL:
https://localhost:3000
Build the production application:
yarn buildRun production locally:
yarn startyarn testyarn coveryarn eslintThe desktop application uses Tauri v2.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsudo apt install \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelfyarn tauri:devyarn tauri:buildThe project uses Redis for SSR shell caching.
docker network create app-netdocker run -d \
--name redis \
--network app-net \
redisdocker exec -it redis shFlush Redis:
redis-cli flushallRun the production container locally:
docker run -it \
-v /etc/letsencrypt/:/etc/letsencrypt/ \
--network app-net \
-e REDIS_HOST=redis \
-e REDIS_PORT=6379 \
-e SSL_KEY_PATH=/etc/letsencrypt/live/guillaumecisco.com/privkey.pem \
-e SSL_CERT_PATH=/etc/letsencrypt/live/guillaumecisco.com/fullchain.pem \
-p 8001:3000 \
docker_image_name:latestThen open:
https://localhost:8001
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/installbrew install awscliVerify:
aws --versionaws configureRecommended region:
eu-central-1
Main nginx file:
/etc/nginx/nginx.conf
Enable gzip inside the http {} block:
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_types
text/plain
text/css
text/javascript
application/javascript
application/json
application/xml
application/rss+xml
image/svg+xml;
include /etc/nginx/conf.d/*.conf;
}File:
/etc/nginx/conf.d/guillaumecisco.conf
# HTTP
server {
listen 80;
server_name guillaumecisco.com www.guillaumecisco.com;
location ^~ /.well-known/acme-challenge/ {
root /var/www/html;
default_type "text/plain";
try_files $uri =404;
}
location / {
return 301 https://$host$request_uri;
}
}
# HTTPS
server {
listen 443 ssl http2;
server_name guillaumecisco.com www.guillaumecisco.com;
ssl_certificate /etc/letsencrypt/live/guillaumecisco.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/guillaumecisco.com/privkey.pem;
location ^~ /.well-known/acme-challenge/ {
root /var/www/html;
default_type "text/plain";
try_files $uri =404;
}
location / {
proxy_pass https://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_server_name on;
proxy_ssl_verify off;
}
}Validate nginx:
sudo nginx -tReload nginx:
sudo systemctl reload nginxAmazon Linux:
sudo yum install certbotUbuntu:
sudo apt install certbotsudo certbot certonly \
--webroot \
-w /var/www/html \
-d guillaumecisco.com \
-d www.guillaumecisco.comCertificates:
/etc/letsencrypt/live/guillaumecisco.com/
Edit crontab:
sudo crontab -eAdd:
0 3 * * * certbot renew --quiet --deploy-hook "/usr/bin/systemctl reload nginx"sudo certbot renew --dry-runcp tools/deploy_template.js deploy.jsUpdate:
- Docker registry
- image name
- Redis host
- Redis port
- optional Sentry DSN
aws ecr get-login-password --region eu-central-1 \
| docker login --username AWS --password-stdin \
984406419997.dkr.ecr.eu-central-1.amazonaws.comyarn deploydocker run -d \
--name guillaumecisco \
--network app-net \
-v /etc/letsencrypt/:/etc/letsencrypt/:ro \
-e REDIS_HOST=redis \
-e REDIS_PORT=6379 \
-e SSL_KEY_PATH=/etc/letsencrypt/live/guillaumecisco.com/privkey.pem \
-e SSL_CERT_PATH=/etc/letsencrypt/live/guillaumecisco.com/fullchain.pem \
-p 8001:3000 \
984406419997.dkr.ecr.eu-central-1.amazonaws.com/guillaumecisco:latestpackages/
├── webpack/
├── tauri/
├── eslint/
└── test/
src/
public/
tools/
src-tauri/
- Port
80must stay open for Let's Encrypt - Local development requires mkcert certificates
- Redis is required for SSR caching
- HTTPS is enabled in both development and production
- The production backend serves HTTP/2 internally
- The application uses SSR with dynamic chunk loading
- SSR React website
- HTTPS local development
- Automatic SSL renewal
- Dockerized production deployment
- Redis SSR cache
- Tauri desktop support
- Dynamic code splitting





