Skip to content

Commit

Permalink
Downgrading sst to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
LBercovitch committed Jan 30, 2025
1 parent 2ebbb2f commit b4e10d1
Show file tree
Hide file tree
Showing 24 changed files with 12,926 additions and 15,074 deletions.
4 changes: 4 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GEOCORE_API_DOMAIN=https://geocore.api.geo.ca
OIDC_CLIENT_ID=53br9dirl7io6qoolkf6afjsj5
COGNITO_USERPOOL_ID=ca-central-1_7DZIA1rpl
OIDC_CUSTOM_DOMAIN=https://auth-dev.geo.ca
4 changes: 4 additions & 0 deletions .env.live-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GEOCORE_API_DOMAIN=https://geocore.api.geo.ca
OIDC_CLIENT_ID=53br9dirl7io6qoolkf6afjsj5
COGNITO_USERPOOL_ID=ca-central-1_7DZIA1rpl
OIDC_CUSTOM_DOMAIN=https://auth-dev.geo.ca
4 changes: 4 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GEOCORE_API_DOMAIN=https://geocore.api.geo.ca
OIDC_CLIENT_ID=
COGNITO_USERPOOL_ID=
OIDC_CUSTOM_DOMAIN=
4 changes: 4 additions & 0 deletions .env.stage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GEOCORE_API_DOMAIN=https://geocore-stage.api.geo.ca
OIDC_CLIENT_ID=
COGNITO_USERPOOL_ID=
OIDC_CUSTOM_DOMAIN=
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

26 changes: 6 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
# dependencies
.DS_Store
node_modules

# typescript
**/*.d.ts

# sst
/build
.svelte-kit
.sst

# tmp files
.#*

# env
.env*.local
.env

# opennext
.open-next

# misc
.DS_Store
.direnv
/package
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

50 changes: 38 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,44 @@
# README
# App.geo.ca-v2

App.geo.ca v2 is an app that will allow users to browser the geo.ca data catalog.
This project uses the [sveltekit](https://kit.svelte.dev/) framework and [sst](https://sst.dev/) to build and deploy to AWS a fullstack applications allowing for the search and cataloging of geospatial data.

## Usage
## Developing

The project uses (sst)[https://sst.dev/docs/] as a way to declare and deploy it's infrastructure.
Once you've created a project and installed dependencies with `npm install`, start a development server:

## Dev
- setup your aws credentials. [documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
- set the correct version of npm as indicated by the `.nvmrc` file. see [nvm](https://github.com/nvm-sh/nvm) for macos/linux and [nvm-windows](https://github.com/coreybutler/nvm-windows) for windows.
- open a new terminal
- from `/` run `npm i`.
- from `/packages/web-app/` run `npm i`. A nodejs version that matches the `.nvmrc` may be required.
- enshure the correct [secrets](https://sst.dev/chapters/handling-secrets-in-sst.html) are configured. (Use npx instead of pnpm).
- enshure your login and logout url's are configured correctly in aws cognito.

1. start by setting you aws credentials.
2. ensure you have the correct version of node.js installed by referencing the `.nvmrc`.
3. Execute the following commands:
- Allowed callback URLs
- http://localhost:5173/en-ca/sign-in/receive
- http://localhost:5173/fr-ca/sign-in/receive
- Allowed sign-out URLs
- http://localhost:5173/en-ca/sign-in/logout
- http://localhost:5173/fr-ca/sign-in/logout

```BASH
npm i
npm run dev
```
- `npm run sst:dev` to deploy the required code to the cloud.
- open another terminal
- `npm run dev` to bind the the previously deployed infrastructure
- you should now be able to work on you local files and have your dev instance seamlessly connect to your aws ressources.

## Building and deploying

- setup your aws credentials for the desired environment. [documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
- enshure the correct [secrets](https://sst.dev/chapters/handling-secrets-in-sst.html) are configured. (Use npx instead of pnpm).
- from `/` run `npm i`.
- from `/packages/web-app/` run `npm i`. A nodejs version that matches the `.nvmrc` may be required.
- enshure your login and logout url's are configured correctly in aws cognito.

- Example allowed callback URLs
- https://d28mialgy1tfmv.cloudfront.net/en-ca/sign-in/receive
- https://d28mialgy1tfmv.cloudfront.net/fr-ca/sign-in/receive
- Example allowed sign-out URLs
- https://d28mialgy1tfmv.cloudfront.net/en-ca/sign-in/logout
- https://d28mialgy1tfmv.cloudfront.net/fr-ca/sign-in/logout

- deploy from the root of the repository: `npm run sst:deploy:{dev|stage|prod}`
10 changes: 0 additions & 10 deletions infra/datalake.ts

This file was deleted.

2 changes: 0 additions & 2 deletions infra/index.ts

This file was deleted.

7 changes: 0 additions & 7 deletions infra/user-table.ts

This file was deleted.

Loading

0 comments on commit b4e10d1

Please sign in to comment.