wasp/waspc/examples/todoApp
2024-08-08 18:28:00 +02:00
..
migrations Using Prisma file alongside Wasp (#2035) 2024-07-03 13:51:29 +02:00
public Migrates internal Todo app to 0.12 (#1781) 2024-02-19 10:16:34 +01:00
src Implement login hooks (#2211) 2024-08-08 18:28:00 +02:00
.env.client.example Made examples/todoApp more approachable (+ documented what it should be used for) (#2094) 2024-06-18 21:02:10 +02:00
.env.server.example Add support for auth with Discord (#2110) 2024-06-25 18:31:58 +02:00
.env.vault Clean up examples/todoApp and updated env vars (#2165) 2024-07-08 13:37:52 +02:00
.gitignore Made examples/todoApp more approachable (+ documented what it should be used for) (#2094) 2024-06-18 21:02:10 +02:00
.waspignore Migrates internal Todo app to 0.12 (#1781) 2024-02-19 10:16:34 +01:00
.wasproot Separate user code into client, server, shared (#753) 2022-11-11 17:20:49 +01:00
Dockerfile Adds support for Dockerfile customization (#732) 2022-10-13 12:46:07 -04:00
ensure_app_compiles_and_builds.sh Made examples/todoApp more approachable (+ documented what it should be used for) (#2094) 2024-06-18 21:02:10 +02:00
main.wasp Implement login hooks (#2211) 2024-08-08 18:28:00 +02:00
package-lock.json Replace oslo/password with directly using @node-rs/argon2 (#2210) 2024-08-02 13:44:10 +02:00
package.json Made examples/todoApp more approachable (+ documented what it should be used for) (#2094) 2024-06-18 21:02:10 +02:00
postcss.config.cjs Replaces Create React App with Vite (#1019) 2023-03-01 17:14:14 +01:00
prettier.config.js Fixes user query cache invalidation (#1014) 2023-02-20 16:28:26 +01:00
README.md Made examples/todoApp more approachable (+ documented what it should be used for) (#2094) 2024-06-18 21:02:10 +02:00
schema.prisma Clean up examples/todoApp and updated env vars (#2165) 2024-07-08 13:37:52 +02:00
tailwind.config.cjs Moves resolveProjectPath to wasp/dev (#1759) 2024-02-13 18:27:26 +01:00
tsconfig.json Adds "module" to tsconfig.json (#2012) 2024-05-08 11:57:31 +02:00
vite.config.ts Migrates internal Todo app to 0.12 (#1781) 2024-02-19 10:16:34 +01:00

TodoApp

The main purpose of this app is for contributors to easily test the version of the wasp CLI that they are working on right now and therefore aid them during development.

That is why it is a bit crowded with features and somewhat incoherent: it is not an app to be used as a showcase, but an app that we use as a "workbench" / "playground" while working on wasp.

This app should always be "up to date", in the sense that we keep updating it to always work with the latest changes to wasp. This means you can count on it being up to date, but also that you should make sure to keep it up to date as you do changes. You should also be adding new features to it if you implement them, so they can easily be tested / tried out.

Set up

Env vars

To do the minimum to get the app running, do:

cp .env.server.example .env.server

This will create a .env.server file with some basic env vars set to dummy values. This will allow your app to run and work, but not all features will work, e.g. Google Auth won't work because it needs you to provide real API keys via env vars.

To obtain all the API keys to get all the features of the app working, if you do need that, you will have to obtain them on your own, normally from the corresponding third-party services. Check Wasp docs for instructions on how to do this for Google Auth, GitHub Auth, and so on.

Obtaining API keys as a Wasp Team member

If you are a member of the Wasp Team, you don't have to obtain all the API keys on your own.

Instead, you can run npm run env:pull: this will obtain .env.server file that we share on the team level.
We are using https://vault.dotenv.org to power this and have an account/organization up there.
If you modify .env.server and want to persist the changes (for yourself and for the other team members), do npm run env:push.

Running

Start the database in a separate terminal session:

cabal run wasp-cli start db

Migrate the database if needed:

cabal run wasp-cli db migrate-dev

Run the app!

cabal run wasp-cli start

Open localhost:3000 in the browser to see the app!
NOTE: Normally wasp apps open automatically in browser, to help new users find their way, but that can become annoying after some time so here we turned that off.

Testing

Compiling and building

Run ./ensure_app_compiles_and_builds.sh to verify the app correctly compiles (TS) and builds (both client and server).

This is also run in CI.

E2E tests

We don't have any yet, but there is headless-test/examples/todoApp that is a fork from this app but with Playwright tests. We plan to merge these two into one app, to get the best of both worlds.