Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
ef31b65
basic api setup, begin refactor
jamesholcombe Sep 12, 2025
78f4447
org management
jamesholcombe Sep 15, 2025
4caf2bd
create project, project visibility
jamesholcombe Sep 17, 2025
2cd67ad
manage org members working
jamesholcombe Sep 17, 2025
fb588a5
add missing files
jamesholcombe Sep 18, 2025
50352d7
refactor sidebar
jamesholcombe Sep 30, 2025
0278979
temp
jamesholcombe Sep 30, 2025
e15ef4e
refactor dashboard
jamesholcombe Oct 1, 2025
437768d
refactor project team
jamesholcombe Oct 1, 2025
e553240
run knip to remove unused code
jamesholcombe Oct 1, 2025
d7bc049
refactor map
jamesholcombe Oct 3, 2025
bcb5033
setup proper linting for api
jamesholcombe Oct 5, 2025
f20b4d2
fix type errors for lint
jamesholcombe Oct 5, 2025
926ea6e
fix more type issues preventing build
jamesholcombe Oct 5, 2025
8dc665e
remove dist from git history
jamesholcombe Oct 5, 2025
8366ce7
update pl, gitignore
jamesholcombe Oct 5, 2025
04a89b2
ci
jamesholcombe Oct 6, 2025
ec094cd
refactor imports to use api
jamesholcombe Oct 7, 2025
c9b5f2c
data layout working, need to refactor other dals
jamesholcombe Oct 8, 2025
5031081
refactor query functions
jamesholcombe Oct 9, 2025
97a9a51
zone filtering working
jamesholcombe Oct 9, 2025
fd4c74d
build working for plots
jamesholcombe Oct 13, 2025
0ecc22e
refactor folders
jamesholcombe Oct 13, 2025
7165342
Merge branch 'main' into feat/orgs
jamesholcombe Oct 13, 2025
b6cebcf
temp
jamesholcombe Oct 13, 2025
5b1464e
update pl
jamesholcombe Oct 13, 2025
d891b43
begin logs refactor
jamesholcombe Oct 13, 2025
38fc2b4
lint
jamesholcombe Oct 14, 2025
fa76c96
Merge branch 'main' into feat/orgs
jamesholcombe Oct 14, 2025
e4219d5
update pl
jamesholcombe Oct 14, 2025
6c47c87
fix
jamesholcombe Oct 14, 2025
9328d0b
fix import for geojson in api
jamesholcombe Oct 14, 2025
52502d7
update api config
jamesholcombe Oct 14, 2025
8f2864f
build errors
jamesholcombe Oct 14, 2025
74cd772
build updates
jamesholcombe Oct 14, 2025
533c900
esbuild for api build
jamesholcombe Oct 14, 2025
1912933
update settings
jamesholcombe Oct 14, 2025
359ebb0
remove vercel json
jamesholcombe Oct 14, 2025
a4002f6
remove rate limiting
jamesholcombe Oct 14, 2025
4dd1640
update github actions
jamesholcombe Oct 15, 2025
d57235c
fix action
jamesholcombe Oct 15, 2025
76360b4
deployment fix
jamesholcombe Oct 15, 2025
5c1d55c
update action
jamesholcombe Oct 15, 2025
f12ba53
update action
jamesholcombe Oct 15, 2025
70e8f5f
action
jamesholcombe Oct 15, 2025
6aecf43
update action
jamesholcombe Oct 15, 2025
da440a8
update action
jamesholcombe Oct 15, 2025
1b373d0
fix action
jamesholcombe Oct 15, 2025
f1ca0b7
update action
jamesholcombe Oct 15, 2025
c89ed8f
update action
jamesholcombe Oct 15, 2025
d0efbce
update action
jamesholcombe Oct 15, 2025
3e3e0fe
update action
jamesholcombe Oct 16, 2025
9a9fdf6
update build
jamesholcombe Oct 16, 2025
ea2bd1c
update action
jamesholcombe Oct 16, 2025
50588be
update action
jamesholcombe Oct 16, 2025
99c55ab
simpler build
jamesholcombe Oct 16, 2025
729b9ce
remove path duplication
jamesholcombe Oct 16, 2025
084f6a9
update build
jamesholcombe Oct 16, 2025
7902823
update web action
jamesholcombe Oct 16, 2025
0449108
remove migration step
jamesholcombe Oct 16, 2025
812f55d
update deps
jamesholcombe Oct 16, 2025
118aa8f
update deps
jamesholcombe Oct 16, 2025
cc78835
update deps
jamesholcombe Oct 16, 2025
d68b3e7
update pl
jamesholcombe Oct 16, 2025
b881959
revert zod and fix lints
jamesholcombe Oct 16, 2025
a0d84c6
lint
jamesholcombe Oct 16, 2025
a809418
lint
jamesholcombe Oct 16, 2025
5286096
working build
jamesholcombe Oct 16, 2025
7844973
lint
jamesholcombe Oct 16, 2025
192aa42
add missing packages
jamesholcombe Oct 16, 2025
bddaea3
lint
jamesholcombe Oct 16, 2025
f986080
add type assertions
jamesholcombe Oct 16, 2025
d1e106f
fix lin
jamesholcombe Oct 16, 2025
15e71a8
fix role access
jamesholcombe Oct 16, 2025
0395f0c
pin typescript version
jamesholcombe Oct 16, 2025
0723692
fix zod schemas
jamesholcombe Oct 16, 2025
64c8565
update action
jamesholcombe Oct 16, 2025
7a51378
update action
jamesholcombe Oct 16, 2025
fa8ed14
update action
jamesholcombe Oct 16, 2025
e264c3b
add preview envs
jamesholcombe Oct 17, 2025
cd3951d
update action
jamesholcombe Oct 17, 2025
465bc7a
update aciton
jamesholcombe Oct 17, 2025
8c6d11d
update build
jamesholcombe Oct 17, 2025
45cf433
fix
jamesholcombe Oct 17, 2025
9831d41
try again
jamesholcombe Oct 17, 2025
415a87b
update workflow
jamesholcombe Oct 17, 2025
d43e9cf
update build
jamesholcombe Oct 17, 2025
dd02707
another go
jamesholcombe Oct 17, 2025
c86839d
revert to vercel deploy and build
jamesholcombe Oct 17, 2025
3fd9304
update API
jamesholcombe Oct 17, 2025
bac4892
allow automated build
jamesholcombe Oct 19, 2025
d7b4016
add related projects
jamesholcombe Oct 19, 2025
08ccf25
remove files from api build
jamesholcombe Oct 19, 2025
353e641
fix esbuild problem
jamesholcombe Oct 19, 2025
d474cf7
fix esm issues
jamesholcombe Oct 19, 2025
82b4878
fix api imports
jamesholcombe Oct 19, 2025
9df1b5a
fix more imports
jamesholcombe Oct 19, 2025
5a753c0
update esbuild
jamesholcombe Oct 19, 2025
972dac7
update build
jamesholcombe Oct 19, 2025
3117e2e
remove dist
jamesholcombe Oct 19, 2025
1a7755b
update things
jamesholcombe Oct 19, 2025
862adb5
fix: use esbuild alias instead of plugin for @common imports
jamesholcombe Oct 19, 2025
9f2ee57
fix
jamesholcombe Oct 19, 2025
62960e9
fix vercel monorepo deployment configuration
jamesholcombe Oct 19, 2025
715ca83
fix vercel runtime configuration
jamesholcombe Oct 19, 2025
953cd71
working
jamesholcombe Oct 19, 2025
73e54be
update pl
jamesholcombe Oct 19, 2025
7622a49
refactor, lint, deps
jamesholcombe Oct 19, 2025
75073e2
the final refactor...
jamesholcombe Oct 20, 2025
f92b856
fix vercel json
jamesholcombe Oct 20, 2025
761dba0
better auth checks
jamesholcombe Oct 21, 2025
711b369
remove aws from bundled
jamesholcombe Oct 21, 2025
bb28d3c
remove server use of api in client component
jamesholcombe Oct 21, 2025
20e642c
add logging to middleware
jamesholcombe Oct 21, 2025
c7d7616
add redirect to login
jamesholcombe Oct 21, 2025
3ae129c
add more logging
jamesholcombe Oct 21, 2025
0ee556c
fix path in next config
jamesholcombe Oct 21, 2025
9eebaf3
add more logging
jamesholcombe Oct 21, 2025
687d727
remove debug code
jamesholcombe Oct 21, 2025
9b39ea6
change router order
jamesholcombe Oct 21, 2025
8e9e7ba
read users by email
jamesholcombe Oct 21, 2025
f79e46c
update api vercel json
jamesholcombe Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
100 changes: 100 additions & 0 deletions .github/actions/get-database-url/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Get Neon DATABASE_URL
description: Get DATABASE_URL from Neon branch or Vercel project
inputs:
is_production:
description: "Whether this is a production deployment"
required: true
neon_branch:
description: "Neon branch name for preview deployments"
required: true
neon_project_id:
description: "Neon project ID"
required: true
neon_api_key:
description: "Neon API key"
required: true
vercel_token:
description: "Vercel token"
required: true
vercel_team:
description: "Vercel team"
required: false
vercel_api_project:
description: "Vercel API project name"
required: true

outputs:
database_url:
description: "The DATABASE_URL"
value: ${{ steps.get_url.outputs.database_url }}

runs:
using: composite
steps:
- name: Get DATABASE_URL
id: get_url
shell: bash
run: |
if [[ "${{ inputs.is_production }}" == "true" ]]; then
echo "Getting DATABASE_URL from Vercel API project..."
vercel env pull --environment=production --token=${{ inputs.vercel_token }} --scope=${{ inputs.vercel_team }} --project=${{ inputs.vercel_api_project }} .env.api
DATABASE_URL=$(grep DATABASE_URL .env.api | cut -d= -f2-)
echo "DATABASE_URL retrieved from Vercel"
else
echo "Getting DATABASE_URL from Neon branch..."
BRANCH_NAME="${{ inputs.neon_branch }}"
echo "Branch name: $BRANCH_NAME"

# Get the branch details from Neon API
BRANCH_DATA=$(curl -s -H "Authorization: Bearer ${{ inputs.neon_api_key }}" \
"https://console.neon.tech/api/v2/projects/${{ inputs.neon_project_id }}/branches" \
| jq -r ".branches[] | select(.name == \"$BRANCH_NAME\")")

if [[ "$BRANCH_DATA" != "null" && -n "$BRANCH_DATA" ]]; then
# Get the branch ID
BRANCH_ID=$(echo "$BRANCH_DATA" | jq -r '.id')
echo "Branch ID: $BRANCH_ID"

# Get the connection URI for the specific branch
# The API requires database_name and role_name parameters
# branch_id is optional but we'll specify it to get the branch-specific URI
CONNECTION_URI=$(curl -s -H "Authorization: Bearer ${{ inputs.neon_api_key }}" \
"https://console.neon.tech/api/v2/projects/${{ inputs.neon_project_id }}/connection_uri?branch_id=$BRANCH_ID&database_name=neondb&role_name=neondb_owner&pooled=true" \
| jq -r '.uri')

echo "Debug: Connection URI:"
echo "Raw URI: ${CONNECTION_URI:0:50}..."

if [[ -n "$CONNECTION_URI" && "$CONNECTION_URI" != "null" ]]; then
# Use the connection URI directly
DATABASE_URL="$CONNECTION_URI"
echo "Using connection URI directly"
else
echo "No connection URI found, trying alternative approach..."
# Fallback: try to get endpoints and construct manually
ENDPOINTS_DATA=$(curl -s -H "Authorization: Bearer ${{ inputs.neon_api_key }}" \
"https://console.neon.tech/api/v2/projects/${{ inputs.neon_project_id }}/branches/$BRANCH_ID/endpoints")

HOSTNAME=$(echo "$ENDPOINTS_DATA" | jq -r '.endpoints[0].host')
echo "Hostname from endpoints: $HOSTNAME"

if [[ -n "$HOSTNAME" && "$HOSTNAME" != "null" ]]; then
# Construct manually with default values
DATABASE_URL="postgresql://neondb_owner:password@${HOSTNAME}/neondb?sslmode=require"
echo "Constructed DATABASE_URL manually"
else
echo "Could not get hostname from endpoints"
exit 1
fi
fi

echo "Final DATABASE_URL: ${DATABASE_URL:0:50}..."
echo "DATABASE_URL retrieved from Neon"
else
echo "Could not find branch: $BRANCH_NAME"
exit 1
fi
fi

echo "database_url=$DATABASE_URL" >> $GITHUB_OUTPUT
echo "DATABASE_URL=$DATABASE_URL" >> $GITHUB_ENV
97 changes: 0 additions & 97 deletions .github/workflows/neon_workflow.yml

This file was deleted.

Loading