Skip to content

romgrk/pepiniere

Repository files navigation

Pepiniere

This repository contains the code for an hour-tracking app for the Pépinière aux Arbres Fruitiers.

Requirements

  • docker
  • docker-compose
  • nodejs >= 8.x

Quick setup

npm install # install dependencies (first time)
npm run setup # creates directories (once only)
# vim ./data/config/config.js # put your email in .authorizedEmail and edit any other setting
npm run build:all # builds everything
npm run docker:db # starts database (doesnt run detached)
npm run docker:web # starts app (doesnt run detached)

A more detailed explanation of the setup is desribed in the Running section.

Important: You can leave the current google oauth config for testing, but it will be important that you create your own app if you switch to production. See the Google OAuth section.

Note: when you make changes, rebuild the app with npm run build:all.

General structure

.
├── bin/www     -- starts the application
├── client      -- all front-end files are here
│   ├── build       -- autogenerated. Is copied at /public on `npm run build`
│   │   └── static
│   │       ├── css
│   │       ├── js
│   │       └── media
│   ├── public
│   └── src
│       ├── actions
│       ├── assets
│       ├── components
│       ├── constants
│       ├── containers
│       ├── reducers
│       ├── routes
│       ├── store
│       ├── styles
│       └── utils
├── config/config.js    -- development configuration file
├── data                -- where data is stored
│   ├── db                  -- This folder is mounted as a volume in the image, for DB files
│   └── files               -- Mounted as well, but here are stored the user-uploaded files
├── helpers         -- general purpose utils
├── models          -- models for interacting with the database
├── public          -- autogenerated public files
│   ├── static
│   |   ├── css
│   |   ├── js
│   |   └── media
|   └── index.html
├── routes/ -- contains API routes
└── app.js -- backend app entry point

Development

The first time, run:

npm install
npm run setup

Then, let these 2 commands run in separate terminals:

npm run start:dev
cd client && npm start # runs webpack-dev-server

Building

npm run build

About

Simple PWA that tracks time spent on tasks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published