💬 This was an interview exercise that I had a bit of fun with, went a bit crazy on the design. Runs on Firebase.
Headless ecommerce site. Ingests a list of products, allows user to browse and create a basket.
In development mode, install the packages and start the dev server. You can
access the app at http://localhost:3000:
yarn
yarn startIn production mode, install the packages, build the files then use a server to
serve them. You can access the app at http://localhost:8080 (depends on your
server of choice):
yarn
yarn build
npx http-server ./publicOr you can use Docker. You can access the app at http://localhost:8080.
docker build -t argoose .
docker run -p 8080:8080 argooseTo run the tests in watch mode:
yarn
yarn testTo run the tests without watch mode:
sh
yarn test:ci
We're using ESLint to detect code problems, and prettier to format code. Highly recommend you enable your editor's "format on save" option to automatically run prettier every time you save a file.
yarn lint
yarn lint --fix
yarn formatPushing to main will automatically deploy the app.
If you want to deploy locally, you'll need my firebase credentials, which isn't going to happen. Or you can deploy to your own firebase!
- Create a firebase account and create an app
- Globally install the
firebase-toolspackage - Run
firebase login - Create a
.firebasercfile with your project ID:
{
"projects": {
"default": "app-95b1e"
}
}