2020-10-16 19:37:34 +02:00
# FactorioSites
2021-03-13 02:00:19 +02:00
Mono-repo for [Factorio Blueprints ](https://factorioblueprints.tech ).
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
Factorio Blueprints delivers a platform to easily share blueprints and with minimal effort get the most value from them, with advanced search and real-time rendering of blueprints.
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
# Links
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
- [Issues & Suggestions ](https://github.com/barthuijgen/factorio-sites/issues )
- [Roadmap ](https://github.com/barthuijgen/factorio-sites/projects/1 )
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
# Credits
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
Factorio Blueprints uses a part of the [Factorio blueprint editor ](https://github.com/teoxoy/factorio-blueprint-editor ) by [Teoxoy ](https://github.com/Teoxoy ). Lisenced MIT.
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
This amazing project allows us to render real time high quality images directly when opening any blueprint.
2020-10-22 15:53:06 +02:00
2021-03-11 23:59:31 +02:00
# Want to contribute?
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
## Prerequisites
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
- A postgres database (docker-compose.yml provided)
- A Google Cloud Platform project
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
## Setting up the project
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
- Add a `.env.local` file to apps/blueprints/ with the following values
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
```
POSTGRES_DB=factorio-blueprints
POSTGRES_USER=factorio-blueprints
#POSTGRES_HOST=127.0.0.1
#POSTGRES_PASSWORD=local
STEAM_WEB_API_KEY=(optional, for steam login)
GOOGLE_APPLICATION_CREDENTIALS="full/path/to/json-key-file.json"
GCP_BLUEPRINT_STRINGS_BUCKET=blueprint-strings
GCP_BLUEPRINT_IMAGES_BUCKET=blueprint-images
```
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
- Add a `.env` file to apps/blueprints/prisma with a database connection url like
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
```
DATABASE_URL="postgresql://factorio-blueprints:local@127.0.0.1:5432/factorio-blueprints"
```
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
- Run DB migration
2020-10-16 19:37:34 +02:00
2021-03-11 23:59:31 +02:00
```
cd apps/blueprints & & npx prisma migrate deploy --preview-feature
```
- Run local app
```
nx serve
```