Skip to content

hdoro/gororobas

Repository files navigation

Gororobas, collaborative agroecology wiki

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://gororobas.com/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 Gel 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 Gel to your machine
  4. Run pnpm install to install the dependencies
  5. In a separate terminal, run gel project init to start an Gel instance for the current config
  6. Run gel ui to open the Gel Studio
  7. Then, in the same Gel terminal, run gel watch to have it watch changes to your schema
  8. After Gel 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 Gel 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 Gel Cloud in your terminal with gel cloud login
  2. Migrate the current database schema to the cloud with gel 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:
    gel dump <your-dump.dump>
    gel 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.

Restaurando backups

A partir do backup baixado no S3:

  1. Instale o GPG:
    • Windows: winget install GnuPG.GnuPG
    • MacOS: brew install gpg
    • Linux: sudo apt-get install gpg
  2. Decodifique a encriptação do backup com: gpg --decrypt --output decrypted_backup.dump.gz input_file.dump.gpg
    • A chave de encriptação é a mesma que foi usada para criar o backup
  3. Descompacte o backup: gunzip decrypted_backup.dump.gz
  4. Restaure o backup: gel restore decrypted_backup.dump localmente, ou gel restore -I ORG/INSTANCE_NAME decrypted_backup.dump na nuvem