An app made by Sandstream Development team, to track office inventory, groceries, and even your daily tasks!
App uses WebSockets technology via Socket.io
library to provide a better user experience.
Client:
- React.js,
- Redux
Server:
- Node,
- Express.js
Database:
- MongoDB
Please remember first to create .env file in the root directory of the project and add necessary .env keys that you can find in the .env-example file.
git clone https://github.com/sandstreamdev/eoc.git
cd eoc
npm install
monogod
npm run dev
npm run build
At first run of the app, log in and check your user id in the database under eoc/users directory. Put that user ID, generated by mongo to .env file under USER_ID variable and save the file. Then simply run npm run seed.
Probably USER_ID in your database is not matching with USER_ID in your .env file. Be aware that if you clean up the whole database with users collection, your USER_ID delivered by mongo will be different compared to the previous session.
When playing with data via MongoDB Compass, always clean all the collections omitting users collection, so you don't have to deal with USER_ID configuration over and over again.
"check": - runs lint, format and stylelint scripts together,
"clear-demo": - clears demo data from the database,
"build:dev": - builds for development,
"build:prod": - builds for production,
"dev": - runs development server,
"format": - formats all the files using Prettier,
"format:fix": - formats and fix all the files using Prettier,
"libs": "scripts/libs.sh -j server/data/libraries.json -m LIBRARIES.md",
"lint": - lint all the files using eslint,
"lint:fix": - lint and fix all files using eslint,
"migrate": - runs migration script,
"migrate:up": - migrate database up,
"migrate:down": - migrate database down,
"seed": - seed database with demo data,
"start:client:dev": - start client dev server,
"start:server:dev": - start dev server,
"start:server:prod": - start production server,
"stylelint": - stylelint all style files,
"stylelint:fix": - stylelint and fix all style files,
"test": - run tests
To perform DB migrations we use migrate-mongo
tool. To config migrate-mongo
edit migrate-mongo-config.js
file. To create migration file run npm run migrate create <version>
in your terminal. Migration file will be created at server/migrations directory. To run all new migrations run npm run migrate:up
or npm run migrate up
in your terminal. To rollback, last migration run npm run migrate:down
or npm run migrate down
in your terminal. To see migrations status run npm run migrate status
in your terminal.
To generate json and markdown files containing third-party licenses you need to install globally: license-checker and npm-license-crawler:
npm i license-checker npm-license-crawler -g
cd eoc
This script create two files: JSON file and markdown file.
The first one contains data about packages used in the project. It is used by controllers: getLibraries
and getLicense
to extract this data and send it to the client to display information about the used package.
The second file contains a list of packages used in the project with links to their repositories and license file. It is available on the project repository page.
npm run libs -j path/to/json/file [-m path/to/md/file]
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
- FontAwesome Free. Check Font Awesome license ,
- Google Trademark Logo : ©2018 Google LLC All rights reserved. Google and the Google logo are registered trademarks of Google LLC.
- Pravatar API. It is published under CC0 license. Pravatar uses photos from Pexels.
Thanks goes to these wonderful people (emoji key):
sandstreamdevelopment 💼 💵 🤔 |
Adam Klepacz 💻 📖 🎨 🤔 👀 |
Aleksander Fret 💻 📖 🎨 🤔 👀 |
Marek Rozmus 👀 💻 📖 🎨 🤔 🚇 📆 |
Przemysław Zalewski 👀 🤔 |
mariusz-machnicki 🐛 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!