diff --git a/README/PUSH.md b/README/PUSH.md new file mode 100644 index 0000000..32b0429 --- /dev/null +++ b/README/PUSH.md @@ -0,0 +1,57 @@ +Push the current workspace to a remote Git repository + +This repository contains helper files to push the current code to a remote git server (example: https://git.algios.dev/francescoalbano/tripweb.git). + +Important: I (the assistant) cannot run git push from here. Run the following commands locally on your machine where you have your SSH keys / credentials configured. + +Quick commands + +1) Verify you are on the correct branch and that working tree is clean: + +```bash +git status +# commit any changes +git add -A +git commit -m "Prepare repo for remote" # if needed +``` + +2) Add remote and push (automatic): + +```bash +# make script executable +chmod +x scripts/push-to-remote.sh +# run the script — it defaults to the repo you provided +./scripts/push-to-remote.sh https://git.algios.dev/francescoalbano/tripweb.git main +``` + +If you prefer manual commands: + +```bash +# add remote (if not present) +git remote add origin https://git.algios.dev/francescoalbano/tripweb.git +# set branch name (main assumed) +git branch -M main +# push +git push -u origin main +``` + +If your remote expects SSH, use the SSH URL instead: + +```bash +# example +git remote add origin git@git.algios.dev:francescoalbano/tripweb.git +git push -u origin main +``` + +Troubleshooting + +- Permission denied / authentication: ensure your SSH key or username/password is configured for the remote server. Prefer SSH keys. +- Repo doesn't exist: create an empty repo on the remote first (on git.algios.dev web UI) and then push. +- Non-fast-forward errors: if the remote already has commits, consider pulling first or force push only if you understand the risks. + +Next steps I can do for you + +- Create a GitHub Actions workflow to build frontend and/or backend and push images/artifacts to the remote registry. +- Create `docker-compose.prod.yml` and deployment SSH Actions that deploy to your Proxmox host. + +Tell me which of the above you want me to generate next. \ No newline at end of file diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..84cc0d7 --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,3 @@ +/.venv/ + +**/__pycache__/ diff --git a/backend/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg b/backend/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg new file mode 100644 index 0000000..e59ec16 Binary files /dev/null and b/backend/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg differ diff --git a/backend/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg b/backend/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg new file mode 100644 index 0000000..fa659d0 Binary files /dev/null and b/backend/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg differ diff --git a/backend/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg b/backend/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg new file mode 100644 index 0000000..d07ed66 Binary files /dev/null and b/backend/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg differ diff --git a/backend/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg b/backend/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg new file mode 100644 index 0000000..3906743 Binary files /dev/null and b/backend/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg differ diff --git a/backend/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg b/backend/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg new file mode 100644 index 0000000..395978d Binary files /dev/null and b/backend/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg differ diff --git a/backend/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg b/backend/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg new file mode 100644 index 0000000..8c750e4 Binary files /dev/null and b/backend/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg differ diff --git a/backend/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg b/backend/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg new file mode 100644 index 0000000..35692eb Binary files /dev/null and b/backend/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg differ diff --git a/backend/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg b/backend/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg new file mode 100644 index 0000000..1c837f9 Binary files /dev/null and b/backend/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg differ diff --git a/backend/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg b/backend/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg new file mode 100644 index 0000000..5427c9e Binary files /dev/null and b/backend/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg differ diff --git a/backend/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg b/backend/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg new file mode 100644 index 0000000..234c34b Binary files /dev/null and b/backend/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg differ diff --git a/backend/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg b/backend/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg new file mode 100644 index 0000000..b13b9a0 Binary files /dev/null and b/backend/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg differ diff --git a/backend/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg b/backend/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg new file mode 100644 index 0000000..880ae2b Binary files /dev/null and b/backend/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg differ diff --git a/backend/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg b/backend/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg new file mode 100644 index 0000000..e96dd1d Binary files /dev/null and b/backend/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg differ diff --git a/backend/storage/trip.sqlite b/backend/storage/trip.sqlite new file mode 100644 index 0000000..dfd4fb8 Binary files /dev/null and b/backend/storage/trip.sqlite differ diff --git a/scripts/push-to-remote.sh b/scripts/push-to-remote.sh new file mode 100755 index 0000000..73ab8a5 --- /dev/null +++ b/scripts/push-to-remote.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +set -euo pipefail + +# push-to-remote.sh +# Usage: ./scripts/push-to-remote.sh [remote_url] [branch] +# If remote exists it will be used; otherwise added as 'origin'. + +REMOTE_URL=${1:-https://git.algios.dev/francescoalbano/tripweb.git} +BRANCH=${2:-main} + +print() { echo "[push-to-remote] $*"; } + +# Ensure git repo +if [ ! -d .git ]; then + print "No .git found in current directory. Initialize and commit? (y/n)" + read -r yn + if [ "${yn,,}" != "y" ]; then + print "Aborting."; exit 1 + fi + git init + git add . + git commit -m "Initial commit" +fi + +# Ensure working tree clean +if [ -n "$(git status --porcelain)" ]; then + print "Working tree is not clean. Please commit or stash changes first."; + git status --porcelain + exit 1 +fi + +# Add remote if missing +if git remote get-url origin >/dev/null 2>&1; then + CURRENT_URL=$(git remote get-url origin) + if [ "$CURRENT_URL" != "$REMOTE_URL" ]; then + print "Remote 'origin' exists and points to $CURRENT_URL" + print "Do you want to set origin to $REMOTE_URL ? (y/n)" + read -r yn + if [ "${yn,,}" = "y" ]; then + git remote remove origin + git remote add origin "$REMOTE_URL" + else + print "Keeping existing origin. Aborting."; exit 1 + fi + else + print "Remote 'origin' already set to $REMOTE_URL" + fi +else + git remote add origin "$REMOTE_URL" + print "Added origin -> $REMOTE_URL" +fi + +# Ensure branch exists locally +if git rev-parse --verify "$BRANCH" >/dev/null 2>&1; then + git checkout "$BRANCH" +else + git checkout -b "$BRANCH" +fi + +# Push +print "Pushing to origin/$BRANCH..." +# Use upstream set on first push +git push -u origin "$BRANCH" +print "Push complete. If this was the first push, create the repo on remote or ensure you have permission and the repo exists." + +# End diff --git a/src/proxy.conf.json b/src/proxy.conf.json new file mode 100644 index 0000000..e90383e --- /dev/null +++ b/src/proxy.conf.json @@ -0,0 +1,8 @@ +{ + "/api": { + "target": "http://localhost:8000", + "secure": false, + "changeOrigin": true, + "logLevel": "warn" + } +} \ No newline at end of file diff --git a/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg b/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg new file mode 100644 index 0000000..e59ec16 Binary files /dev/null and b/storage/assets/218a7429-90e8-4377-9d25-c03f9cad82e6.jpeg differ diff --git a/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg b/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg new file mode 100644 index 0000000..fa659d0 Binary files /dev/null and b/storage/assets/32b4ce25-ce31-4471-8054-34c696537aa4.jpeg differ diff --git a/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg b/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg new file mode 100644 index 0000000..d07ed66 Binary files /dev/null and b/storage/assets/39a2b698-4469-45c5-b39a-bce131a657bc.jpeg differ diff --git a/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg b/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg new file mode 100644 index 0000000..3906743 Binary files /dev/null and b/storage/assets/3d19ab17-0f82-42ac-a4d0-fd18409156a9.jpeg differ diff --git a/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg b/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg new file mode 100644 index 0000000..395978d Binary files /dev/null and b/storage/assets/55fe4a10-3732-4b4b-9997-1564fd83e8b1.jpeg differ diff --git a/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg b/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg new file mode 100644 index 0000000..8c750e4 Binary files /dev/null and b/storage/assets/6489e07f-949a-4ede-851c-9118a717b3af.jpeg differ diff --git a/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg b/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg new file mode 100644 index 0000000..35692eb Binary files /dev/null and b/storage/assets/72bf08ab-11bc-47a1-bdf3-406df28e77a9.jpeg differ diff --git a/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg b/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg new file mode 100644 index 0000000..1c837f9 Binary files /dev/null and b/storage/assets/8031c6a7-1925-490c-9233-864c8b018d1e.jpeg differ diff --git a/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg b/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg new file mode 100644 index 0000000..5427c9e Binary files /dev/null and b/storage/assets/8bcaeb4a-d43f-467a-b65b-28eac855d4bf.jpeg differ diff --git a/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg b/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg new file mode 100644 index 0000000..234c34b Binary files /dev/null and b/storage/assets/b509ba71-cfee-4fdc-81d7-7f7668ee676a.jpeg differ diff --git a/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg b/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg new file mode 100644 index 0000000..b13b9a0 Binary files /dev/null and b/storage/assets/cf5e96b1-a5e0-4ff0-9754-52727a85e2c2.jpeg differ diff --git a/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg b/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg new file mode 100644 index 0000000..880ae2b Binary files /dev/null and b/storage/assets/d0c68319-6e6a-4fca-bce3-5ecf4ffdd349.jpeg differ diff --git a/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg b/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg new file mode 100644 index 0000000..e96dd1d Binary files /dev/null and b/storage/assets/fc7c0374-6120-4296-84a8-8475ce73c2ea.jpeg differ diff --git a/storage/trip.sqlite b/storage/trip.sqlite new file mode 100644 index 0000000..dfd4fb8 Binary files /dev/null and b/storage/trip.sqlite differ