https://github.com/hackgt/piranha
Internal financial processes made fun, or at least more efficient
https://github.com/hackgt/piranha
finance graphql hackgt postgresql prisma2 react typescript
Last synced: 6 months ago
JSON representation
Internal financial processes made fun, or at least more efficient
- Host: GitHub
- URL: https://github.com/hackgt/piranha
- Owner: HackGT
- License: mit
- Created: 2020-03-21T04:49:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T20:21:29.000Z (about 2 years ago)
- Last Synced: 2025-03-28T21:51:10.039Z (6 months ago)
- Topics: finance, graphql, hackgt, postgresql, prisma2, react, typescript
- Language: TypeScript
- Homepage:
- Size: 5.6 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 56
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Development Overview
Piranha is an application to help HackGT manage our internal financial processes ("sinking our teeth in") so to speak.
## Architecture
##### Backend Architecture
- Language: TypeScript
- Framework: Node.js/Express
- Database: Postgres
- Authentication: [Ground Truth](https://github.com/hackgt/ground-truth)
- API: GraphQL ([Apollo Server](https://www.apollographql.com/docs/apollo-server))
- Dependency management: yarn
- Where: [/server](/frontend)##### Frontend Architecture
- Language: TypeScript
- Framework: React
- UI Library: [Ant Design](https://ant.design)
- API Client: GraphQL ([Apollo Client](https://www.apollographql.com/docs/react/))
- Dependency management: yarn
- Where: [/client](/client)## Setup
#### Server
1. `cd server` then `yarn install`
2. `yarn migrate:dev` to setup database
3. `yarn generate` to generate Prisma client and GraphQL types
4. `yarn dev`#### Environment Variables
Once you have the backend dependencies installed,
configure the backend environment variables by copying [.env.example](.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.
#### Client
1. `cd client` then `yarn install`
2. `yarn start`## Utilities
### Typings
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.
1. `yarn generate`
Note, anytime either of these schemas are changed, you will need to rerun `yarn generate` to generate new typings.
### Migrations
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.
1. `yarn migrate:dev`
2. `yarn generate`