Coder Social home page Coder Social logo

twinte-parser's Introduction

Twin:te

Local Development - only docker

build images

docker compose build db db-migration back front sponsorship proxy-docker parser codegen

environment variables on backend

cp back/.env back/.env.local // please edit it

db migration

docker compose run --rm db-migration bash -c 'make migrate-up db_url=${DB_URL}'
docker compose run --rm db-migration bash -c 'make migrate-up db_url=${TEST_DB_URL}'

update courses based on kdb

docker compose run -u root --rm parser python ./download_and_parse.py --year 2024 --output-path kdb_2024.json
mv ./parser/kdb_2024.json ./back/kdb_2024.json
docker compose run -u root --rm back go run .  update-courses-based-on-kdb --year 2024 --kdb-json-file-path kdb_2024.json
rm ./back/kdb_2024.json

start services

docker compose up db back front sponsorship proxy-docker

Access to http://localhost:4000 or http://localhost:4000/sponsorship

Local Development - docker + host machine

Only proxy-host, db and db-migration are running in the docker container.

Version

  • Go : 1.22.x
  • Nodejs : nodejs 22.x.x
  • Python : 3.12.x

Please install direnv. Remember to set hook.

Example in Mac

brew install direnv
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
source ~/.zshrc

Please Install Bun.

Example in Mac

brew install oven-sh/bun/bun

Build Images

docker compose build db db-migration proxy-host

Terminal workspace

docker compose up -d db db-migration
docker compose run --rm db-migration bash -c 'make migrate-up db_url=${DB_URL}'
docker compose run --rm db-migration bash -c 'make migrate-up db_url=${TEST_DB_URL}'

Terminal parser

pip install -r requirements.txt
python download_and_parse.py --year 2024 --output-path kdb_2024.json

Terminal back

cd back

// setup environment variables
cp .env .env.local // please edit .env.local file
direnv allow .

// update courses based on kdb
go run .  update-courses-based-on-kdb --year 2024 --kdb-json-file-path ../parser/kdb_2024.json

// hot reload
go install github.com/air-verse/air@latest
air

Terminal front

cd front
bun install
bun run dev

Terminal sponsorship

cd sponsorship
bun install
bun run dev

Terminal workspace

docker compose up proxy-host

Access to http://localhost:4000 or http://localhost:4000/sponsorship

twinte-parser's People

Contributors

dependabot[bot] avatar hosokawar avatar siy1121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

twinte-parser's Issues

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.