- Git
- Node.js
- Yarn
- Go
- Do not install through brew, use the official website
- Docker
- PostgreSQL
- Install through brew:
brew install postgresql@15
- It requires you to add all the exports to path so read the end of the installation carefully!
- Install through brew:
- Redis
- Install through brew:
brew tap redis-stack/redis-stack
- Then install:
brew install redis-stack
- Install through brew:
- Trunk (Recommended!)
- Visual Studio Code extension for linting/formatting
- migrate
- CLI tool for running migrations
- gofumpt
- A stricter gofmt
- golangci-lint
- A Go linters aggregator
-
Clone the repository
git clone [email protected]:GenerateNU/sac.git
-
Install dependencies
cd frontend/* yarn install
- If you get an error about
expo-cli
not being installed, runyarn global add expo-cli
and then runyarn install
again.
cd backend go get ./...
- If this doesnt work, try running
go mod tidy
and thengo get ./...
again or delete the go.mod and go.sum files and then rungo mod init backend
andgo mod tidy
again.
- If you get an error about
-
Create client build
cd frotend/mobile eas login eas build:configure # ios eas build -p ios --profile development # android eas build -p android --profile development
-
Download the build and drag into simulator
-
Start the client
cd frontend/mobile npx expo start --dev-client
- You can then open the app in the Expo app in the simulator.
npx expo start --dev-client // runnning dev client
npx expo start --dev-client --ios // specific platform
yarn format // format code
yarn lint // lint code
yarn test // run tests
go run main.go // run server
go test ./... // run tests
gofumpt -l -w . // format code
golangci-lint run --fix // lint code
The majority of migrate commands you will use during development, up and down, are handled by the CLI
sac db init
sac db down
Sometimes you may need to force the migration version with the CLI
migrate -path backend/migrations -database "postgres://localhost:5432/sac?sslmode=disable" force <version>
To create a new migration, you can use the CLI
migrate create -ext sql -dir migrations -seq <descriptive-migration-name>
To install use ./install_cli.sh
and then run sac
to see all commands.
-
Create a new branch
git checkout -b <branch-name> // this is determined by your ticket name
-
Make changes and commit changes:
-
Commit changes
git add . git commit
-
We use Conventional Commits for commit messages. (READ!)
-
-
Push changes to GitHub
git push
or
git push origin <branch-name>
-
Create a pull request
- Go to the repository on GitHub
- Click on the
Pull requests
tab - Click on the
New pull request
button - Select the
base
branch asmain
- Select the
compare
branch as<branch-name>
- Click on the
Create pull request
button
-
Issues
Use the Issues tab to create issues if you find any bugs during development or can't find a feature you working on.