Skip to content

A resource designed to help children learn coding basics with fun interactive books!

Notifications You must be signed in to change notification settings

sytraore/codekids

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codekids App

Create env

cd backend
cp .env.example .env

Run backend

(use python3.12)

python -m venv .venv
source .venv/bin/activate
cd backend
pip install -r requirements.txt
prisma generate  # needs a running database
uvicorn src.main:app --reload --port 8080

Updating Schema Database

cd backend
prisma migrate dev

To startup a local database, you can use the following command:

cd backend
docker compose up -d

Run frontend

cd frontend
npm i
npm start

Checks and Formatting

These commands should be run before pushing code. They will check if the code is formatted correctly and if the tests will pass in the CI.

cd frontend
npm run format
CI=True npm run build
cd ../backend
black . --check

To take a backup of the production database, you can use the following command:

pg_dump -h endeavour.cs.vt.edu -p 30030 -U postgres -d codekids > codekids-db-$(date +%Y-%m-%d).bak

to install postgres client 16 on ubuntu

https://dev.to/johndotowl/postgresql-16-installation-on-ubuntu-2204-51ia

to load a backup to your local database

psql postgres://postgres:password@localhost:5432/codekids < /tmp/codekids-db-2025-04-14.bak

if u have an existing database , you will have to clear the docker volume

docker stop  backend-db-1 ###(name of your container- using docker ps -q)
docker rm backend-db-1 ###(container id)
docker volume rm backend_postgres-data ###(docker volume ls)
docker compose up -d ###(create a new volume)

###to setup prisma

cd backend
npx prisma studio

About

A resource designed to help children learn coding basics with fun interactive books!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 91.2%
  • Python 7.3%
  • CSS 0.6%
  • HTML 0.4%
  • Dockerfile 0.2%
  • Nix 0.2%
  • JavaScript 0.1%