* New redesign * Use latest nextjs and bob It fixes the start command * fix: text overflow issue in the organization switcher dropdown (#14) * fix: text overflow issue in the organization switcher dropdown * feat: strict children typings * Force dark mode (#15) If somebody used the light mode before, Hive App displays light version of tailwind classes * Fix dev, GH app optional, project type instead of Connected (#16) * Make Github integration optional * Show project type instead of Connected * Fix dev command * Small changes to the version card (#17) * Small changes to the version card * Apply suggestions from code review * Polish (#18) * Make the design a bit more clean * Add a bit of separation * Apply suggestions from code review Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> * fix: do not access properties on potential undefined variable (#33) * fix: renaming not being added during rebase (#32) * feat: add Mutation.createToken validation (#30) * Remove `#` from organization pages, polish subcription page (#34) * Remove `#` from project/target pages (#38) * fix: add missing service names for multi service projects (#35) * Re-design subscription (#40) * Missing list of changes in the schema diff view (#41) * Missing list of changes in the schema diff view Closes #19 * Apply suggestions from code review Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> * Move titleMap outside of the component Co-authored-by: Dimitri POSTOLOV <en3m@ya.ru> * Blurred fixed header + new `404` page + use `@theguild/prettier-config` (#44) * fix header * make things amazing * Update packages/web/app/pages/404.tsx * fix build * remove unused styles * Add --fix to lint-staged (#43) * Fix access (#45) * Fix access on organization level * Fix access on project level * Fix access on target level * Align with main * Bring back schema view (#49) * Add missing Mark as Valid button (#50) * Update the design of the operations view (#51) * Update doc link Co-authored-by: Dotan Simha <dotansimha@gmail.com> Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com> Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
3.3 KiB
Development
Setup Instructions
-
Clone the repository locally
-
Make sure to install the recommended VSCode extensions (defined in
.vscode/extensions.json) -
In the root of the repo, run
nvm useto use the same version of node as mentioned -
Run
yarnat the root to install all the dependencies and run the hooks -
Run
yarn setupto create and apply migrations on the PostgreSQL database -
Run
yarn generateto generate the typings from the graphql files (useyarn graphql:generateif you only need to run GraphQL Codegen) -
Run
yarn buildto build all services -
Click on
Start Hivein the bottom bar of VSCode -
Open the UI (
http://localhost:3000by default) and Sign in with any of the identity provider -
If you are not added to the list of guest users, request access from The Guild maintainers
-
Once this is done, you should be able to login and use the project
-
Once you generate the token against your organization/personal account in hive, the same can be added locally to
hive.jsonwithinpackages/libraries/cliwhich can be used to interact via the hive cli with the registry
Development Seed
We have a script to feed your local instance of Hive.
- Use
Start Hiveto run your local Hive instance - Make sure
usageandusage-ingestorare running as well (withyarn dev) - Open Hive app, create a project and a target, then create a token
- Run the seed script:
TOKEN="MY_TOKEN_HERE" yarn seed - This should report a dummy schema and some dummy usage data to your local instance of Hive, allowing you to test features e2e
Note: You can set
STAGING=1in order to target staging env and seed a target there.
To send more operations and test heavy load on Hive instance, you can also set
OPERATIONS(amount of operations in each interval round, default is1) andINTERVAL(frequency of sending operations, default:1000ms). For example, usingINTERVAL=1000 OPERATIONS=1000will send 1000 requests per second.
Publish your first schema (manually)
- Start Hive locally
- Create a project and a target
- Create a token from that target
- Go to
packages/libraries/cliand runyarn build - Inside
packages/libraries/cli, run:yarn start schema:publish --token "YOUR_TOKEN_HERE" --registry "http://localhost:4000/graphql" examples/single.graphql
Setting up Slack App for developing
- Download Loophole CLI (same as ngrok but supports non-random urls)
- Log in to Loophole
$ loophole account login - Start the proxy by running
$ loophole http 3000 --hostname hive-<your-name>(@kamilkisiela I usehive-kamil). It createshttps://hive-<your-name>.loophole.siteendpoint. - Message @kamilkisiela and send him the url (He will update the list of accepted redirect urls in both Auth0 and Slack App).
- Update
APP_BASE_URLandAUTH0_BASE_URLinpackages/web/app/.env - Run
packages/web/appand openhttps://hive-<your-name>.loophole.site.
We have a special Slack channel called
#hive-teststo not spam people :)
Setting up GitHub App for developing
- Follow the steps above for Slack App
- Update
Setup URLin GraphQL Hive Development app and set it tohttps://hive-<your-name>.loophole.site/api/github/setup-callback