https://sleuth-sme.herokuapp.com/
An online network connecting local government and SMEs.
The initial MVP will help SMEs build a profile about their product(s) that provides useful information, in an engaging and easily understood way, for local government to discover. The aim for this is to speed up innovation in the public sector and increase the market share for SMEs.
Jessie - Scrum Master | Joe - DevOps | Dominic - QA | Emma - Doc Wizard
Core | Testing | Other |
---|---|---|
Node | jest | babel |
Express | supertest | parcel-bundler |
React | eslint | pg-promise |
PostgreSQL | react-testing-library | serve-favicon |
HTML | nodemon | env2 |
CSS | concurrently | |
Sass |
How to get a copy of the project up and running on your local machine.
Please ensure you have this software installed and running on your local machine before you attempt to run this webapp.
Node (via nvm recomended) see: https://github.com/creationix/nvm
PostgreSQL see: https://wiki.postgresql.org/wiki/Detailed_installation_guides
$ git clone https://github.com/fac-14/sleuth-coop.git
$ cd sleuth-coop
$ npm i
$ cd client
$ npm i
Create a .env
file in the client
folder.
Add this👇 line to the file.
SKIP_PREFLIGHT_CHECK=true
Create the dev and test databases.
$ psql (or pgcli)
# CREATE DATABASE sleuth;
# CREATE DATABASE test_sleuth;
# ALTER DATABASE sleuth OWNER TO [your user];
# ALTER DATABASE test_sleuth OWNER TO [your user];
Create a config.env
file in the root.
Add these👇 lines to the file, to make your local databases work, inserting your own psql username and password.
DATABASE_URL = postgres://[USER]:[PASSWORD]@localhost:5432/sleuth
TEST_DB_URL = postgres://[USER]:[PASSWORD]@localhost:5432/test_sleuth
Add a 'Secret' for password encryption.
SECRET = "[SOMETHING SECRET]"
Use this script that runs db_build.js
$ npm run build-db
OR use pgcli to connect to the sleuth database and run the whole script from db_build.sql by copy/pasting into pgcli.
To make sure everything is working as it should.
$ npm test
$ npm run dev
Wait for a compiled successfully
message.
The webapp should now be running on
localhost:3000
Now you can play with the code all you like 🎉
If you notice anything wrong with the instructions or the project isn't running as expected don't hesitate to raise an issue and we'll try to figure it out.