top90 is a website that populates with soccer goals in real time as they happen around the world.
Anyone is welcome to submit a PR. PRs should be tested and verified locally first if possible.
- api - The API for the website.
- scraper - Scrapes reddit.com/r/soccer for new videos. Stores them in a database.
- syncdata - Gets the latest league, team, and fixture data from apifootball.
- Install Go and Docker if you do not have them installed.
- Run the following command to create local environment files.
cp .env.sample .env && cp .env.docker.sample .env.docker
- Start dev db and s3 in docker.
docker-compose up
- In a new terminal, seed local database
make seed
- Run the api
go run ./cmd/api
Make sure docker is running. The tests spin up pg instances for integration testing.
go test ./...
Part of the docker compose runs a database viewer. Go to http://localhost:8090/?pgsql=db logging in with the following to see it.
username: admin
password: admin
database: redditsoccergoals
Run the following and modify the generated files. See https://github.com/golang-migrate/migrate for details.
brew install golang-migrate
migrate create -ext sql -dir internal/db/migrations -seq name_of_migration