Giter Site home page Giter Site logo

kerams / rsk-search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from warmans/rsk-search

0.0 1.0 0.0 53.12 MB

https://scrimpton.com

Shell 0.21% JavaScript 0.21% Python 0.12% Go 43.67% TypeScript 39.65% Makefile 0.81% HTML 13.10% Dockerfile 0.08% SCSS 2.14%

rsk-search's Introduction

rsk-search

Introduction

This is the project that powers scrimpton.com. It is split into two areas:

Backend (/server):

  • Written in Go
  • Uses Protobuff/Grpc for the API.
  • Static data is stored in Sqlite, Bluge (formerly Bleve) or just flat files (see var/data).
  • Dynamic data (e.g. in-progress contributions) is stored in Postgres.
  • Audio files are stored on the server file system (no CDN or cloud storage).

Frontend (/gui):

  • Written in Typescript (Angular)
  • Styles are based on Bootstrap.
  • Icons are Bootstrap Icons.

There are also some files to give an example of how the service can be deployed in /deploy.

GUI Development

From the gui directory:

  1. Install dependencies npm install.
  2. Start the development server with npm run start-prod. This will not require any local server and will use the live scrimpton.com API.

If the local server is running you can use npm run start to proxy the API to the local running API.

Server development

From the server directory:

Prerequisites:

  1. docker.io, docker-compose (apt install docker.io docker-compose)
  2. direnv (apt install direnv - remember to install shell hook e.g. direnv hook bash > ~/.bashrc)

Setup:

  1. Install tools make setup
  2. Build CLI with make build.
  3. Create the DB and index with make init.all (only needs to be done once, or after the raw data is changed)
  4. Start a local postgres instance make dev.services.start
  5. Run local server with make run.

Note that invalid API keys will be used (see .envrc). These may cause some things not to work correctly.

More info: server README

How to change the API

  1. Edit proto file e.g. proto/search.proto.
  2. Run make generate.
  3. Update code to reflect changes in proto file e.g. pkg/service/grpc/search.go.
  4. In gui directory run npm run generate-api-client to sync the GUI client with the latest API definitions.

More info: GUI README

Deployment

Update scrimpton.com

(requires access to warmans docker hub account)

  1. Create a new git tag git tag x.x.x.
  2. cd gui && npm run release.
  3. cd server && make release.
  4. Re-up docker compose file on server.

(this is done using github actions)

New deployment

  1. Build and push docker images with your own namespace.
  2. Update ./deploy/docker-compose.yaml with correct image names/versions and credentials.
  3. Copy docker-compose file to your server.
  4. Run docker-compose up -d

rsk-search's People

Contributors

fatters avatar warmans avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.