Piranha is an application to help HackGT manage our internal financial processes ("sinking our teeth in") so to speak.
- Language: TypeScript
- Framework: Node.js/Express
- Database: Postgres
- Authentication: Ground Truth
- API: GraphQL (Apollo Server)
- Dependency management: yarn
- Where: /server
- Language: TypeScript
- Framework: React
- UI Library: Ant Design
- API Client: GraphQL (Apollo Client)
- Dependency management: yarn
- Where: /client
cd serverthenyarn installyarn migrate:devto setup databaseyarn generateto generate Prisma client and GraphQL typesyarn dev
Once you have the backend dependencies installed,
configure the backend environment variables by copying .env.example to a new file called .env and filling in the variables.
To setup google file upload, add your Google service account credentials to a file called google-application-key.json in the config directory.
cd clientthenyarn installyarn start
First, this will generate TypeScript typings and a new Prisma client from your Prisma schema (schema.prisma). Then, it will also generate TypeScript typings based on your GraphQL schema (api.graphql) via GraphQL Code Generator.
yarn generate
Note, anytime either of these schemas are changed, you will need to rerun yarn generate to generate new typings.
After changing the Prisma schema (schema.prisma), run the following commands in the server folder to migrate the database and generate a new Prisma client.
yarn migrate:devyarn generate