Skip to content

Repository files navigation

Participator

Demo application for testing, prototyping and learning purposes.

Configuration

E-Mail configuration for smtp support by setting env variables, e.g. in .env file:

EMAIL_HOST=smtp.example.com
EMAIL_SENDER=myEmail@example.com
EMAIL_PASS=mypassword

For jwt security secret key set JWT_SECRET to a random string.

These settings are not required.

Running the app

Just yarn start, or yarn start:debug for server debugging and hot reloading.

Once started, you can go to localhost:3000/api to see a summary of all http routes.

All routes prefixed with api/ return json. Others call Next.js to render components.

You can call yarn seed <EMAIL> [<EMAIL2>, [<EMAIL3>, ...]] to populate dev db with some data, pw will be hello-world

File Structure

There are three groups of directories in src.

  • Server code is in server
  • Client code is in pages and components
    • components has all components grouped by subjects.
    • pages is the file-based routing of next.js.
      • It's the bridge between server and components
      • That's where initial data fetching and layout setting happens.
  • Common code is in types, casl and utils
    • types has all type definitions and validations using superstruct
    • casl defines abilities
    • utils contains common helper functions

Docs

Call yarn doc for compodoc docs generation. It'll show documentation about backend code.

About

Demo application for testing, prototyping and learning purposes

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages