Skip to content

OLEGSHA/KenDB3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KenDB3 web application

This is the source code of KenDB3, intended to go live on https://kendb.windcorp.ru/. Contributions are welcome.

Up-to-date task tree: kendb3-plan.drawio.svg.

See also ARCHITECTURE.md and other files in docs/.

Developer setup

Initial setup:

# Clone repository
git clone https://github.com/OLEGSHA/KenDB3.git

cd KenDB3

# Setup and activate a dedicated venv
python3 -m venv .venv
source .venv/bin/activate

# Install Python packages
pip3 install -r requirements.txt

# Install frontend packages
npm install

# Configure development database
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py loaddata fixtures/sample_users.json fixtures/sample_data.json

The database must contain some sample data for the applications to run properly. Depending on your needs, you may want to create a Django superuser.

Run a development server with a SQLite3 database:

python3 manage.py runserver

Useful environment variables

  • DEBUG – set to False to enter production mode.
  • JAVASCRIPT_PIPELINE__TEST_PRODUCTION – set to True to force production mode for JavaScript pipeline builds. Unsafe; do not use in production.
  • JAVASCRIPT_PIPELINE__SHOULD_RUN – set to True to force JavaScript pipeline builds.
  • JAVASCRIPT_PIPELINE__PREVENT_RUNS – set to True to prevent JavaScript pipeline builds.

See Django 5.0 documentation for more information.

Production setup

See deployment instructions.

makemigrations???

Project is not production-ready yet. Migrations will be committed once the code is deployed on windcorp.ru.

Stack

  • Frontend:
    • NPM – package management
    • Webpack – resource bundling
    • TypeScript – JavaScript with type checking
      • Babel – preprocessor
      • JsRender – lightweight clientside HTML renderer
    • Sass – enhanced CSS
    • served as Django static files
  • Backend:
    • Django – Python web framework
    • Pillow – image processing; used to preprocess static resources
    • cairosvg – SVG renderer; used to preprocess static resources
    • Production database: Dolt – MySQL-compatible database with version control (not yet implemented)
  • Deployment:

License and reuse

Code and assets in this repository are licensed under AGPLv3-or-later (see LICENSE). However, it is not designed to be deployed anywhere except on windcorp.ru.