Skip to content

hdoro/gororobas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gororobas, an agroecology wiki for EdgeDB's hackathon

Screenshot of the app

✨ The app is live at: https://gororobas.com

This is a Typescript project built leveraging the following technologies:

Introduction to the project

Screenshot of the app

You can learn about the project's motivation, tech stack, approach and learnings here: https://hdoro.mmm.page/edgedb-hackathon

Developing locally

  1. Start by populating the .env.example file with the necessary environment variables. You can copy it to .env.local and fill in the values.
    • If you're connected to the Vercel project, you can use vercel env pull to build the production .env file.
  2. In order to authenticate with emails locally, you need to install and run Mailpit. This will allow the EdgeDB server to send emails via your local Mailpit server.
    • 💡 You can still authenticate with Google oAuth without it
  3. To connect to a local database, install EdgeDB to your machine
  4. Run pnpm install to install the dependencies
  5. In a separate terminal, run edgedb project init to start an EdgeDB instance for the current config
  6. Run edgedb ui to open the EdgeDB Studio
  7. Then, in the same EdgeDB terminal, run edgedb watch to have it watch changes to your schema
  8. After EdgeDB has applied the necessary migrations, run bun run generate:all to have the types and our custom EdgeQL SDK generated. This is necessary to interact with the database and the project won't run without it.
  9. After generating types, run bun run auth:setup to configure EdgeDB with the proper authentication settings
  10. Finally, run bun run dev to start the development server and access the app at http://localhost:3000

Deploying the app and database

  1. Log into EdgeDB Cloud in your terminal with edgedb cloud login
  2. Migrate the current database schema to the cloud with edgedb migrate -I ORG/INSTANCE_NAME
  3. If you're starting a new cloud instance, you can seed it with a local dump of data with:
    edgedb dump <your-dump.dump>
    edgedb restore -I <org>/<instance-name> <your-dump.dump>
  4. If you're setting up a Vercel project for it the first time, refer to the official guide on deploying to Vercel
  5. When you push a commit to main, Vercel will automatically build and deploy it to gororobas.com or whatever the domain for the new project you've set up

Credits

People involved in this creation:

Contributing

If you'd like to contribute to the project, please open an issue or a pull request. We're open to suggestions and improvements but aren't sure how they'll pan out yet 🙂

License

This project is licensed under the Apache 2.0 License. You can read more about it in the LICENSE file.