I wanted to create an app to help users to find and download custom rom for their devices in an easy way
Everyone can contribute to the project adding new custom roms to the app or by leaving reviews to those already present
This app was also an opportunity to build my first full-stack project and try new tecnology like Docker
and InfluxDB
The api documentation is the dart code used in the RomLinks Frontend
The code for the rest client is in the logic folder
The api is free without limitation but if you want to install all the services locally and test them you can download the repository, create the .env and run the command below
You need docker
, docker-compose
and Make
to run the services
# influx db config
DOCKER_INFLUXDB_INIT_USERNAME=username
DOCKER_INFLUXDB_INIT_PASSWORD=password
influxToken=influxToken
influxOrg=orgName
influxBucket=bucketName
influxUri=http://influxdb:8086
metrics=false
# mongo config
MONGO_INITDB_ROOT_USERNAME=username
MONGO_INITDB_ROOT_PASSWORD=password
mongoUri=mongodb://username:password@mongodb:27017/?authSource=admin&readPreference=primary&ssl=false
# services config
jwtKey=jwtKey
logFile=false
tls=false
# grafana config
GF_SECURITY_ADMIN_PASSWORD=password
# run all the services
make run
# stop all the services
make stop
# update all the container images
make update
The backend is subdivided in 4 independent microservices:
- Device Service: handle the devices
- File Storage Service: handle the images upload/download/compression and host the website
- Rom Service: handle the roms, the versions and the reviews data
- User Service: handle the users data and generate the jwt token for the users
The services code is in the services folder
- The
*Services.go
file contains the main function and another function for setting the db index or for generating the required folder - The
*Handler
folder contains the code of the api - The
_handler
file manage the api endpoint defined in theroutes
file - The
_model
file contains all the struct with the relative validation functions - The
_db
file contains all the db handler for storing and retriving data
The packages folder contains all the code that is reused in all the services:
- The
api
folder contains all the gin setup and configuration and theapiRes
helper function. It also contain the custom middleware for the metrics and for the errors log - The
db
folder contains the mongodb setup code - The
logger
folder contains the setup and the helper functions for writing logs to a file - The
textSearch
folder container the code for the search function
GNU General Public License v3.0
If you have any suggestion contact me