This repository is the KEEER Vote main repo. This is going to be published on GitHub, so everything except issues and PRs are going to be in English.
- Keep the project structure in dictionary order.
- Follow Git commit message guidelines.
- Make sure ESLint could be passed before committing.
This repo uses psuedo-packages to simplify code. These "packages" could be used:
@vote/core
- mapped to./src/
@vote/api
- mapped to./src/api/
@vote/plugins
- mapped to./src/plugins
@vote/themes
- mapped to./src/themes
@vote/locale
- mapped to./locale
Note that in webpack
-generated files, @vote/*
can only be used in plugins and themes,
while in files ran in npm start
, @vote/*
can be used anywhere.
TBD: publish these actual packages so that IntelliSense could work.
dist/
Distributions. Never removevote-config.js
ejs/
Static HTML templates, used to generate pages in multiple languageslocale/
i18n filessrc/
Main source directoryapi/
Plugin and theme APIplugins/
Pluginssql/
SQLs for reference and updatethemes/
Themesdb.js
Database helperform.js
Form utilsindex.js
Entry pointload-plugins.js
[Not executed] A file to be included in_bundle
log.js
Logging utilsmain.js
Koa applicationplugin.js
Plugin utilsquestion.js
Question utilstheme.js
Theme utilsuser.js
User system
static/
Static files (ToC, images, etc.)
# Run `src/sql/init.sql` first.
cp sample.env .env # Edit `.env` to make your database settings
npm i -D
npm run build
npm start
npm run build
npm run wds
npm run dev
Dev server has Webpack hot module replacement (HMR) enabled by default, but that increases the
first start time as it needs to compile on start. When debugging server-side logic, this could
be annoying. You can use NOFE=1 npm run dev
to run the dev server without any front-end
capabilities.
npm run lint