Grep is a web application that allows you to post and find listings for used items. It is effectively a marketplace for used items, similar to Craigslist or Facebook Marketplace or finn.no.
This project is built using the following technologies:
- Vue.js - A progressive JavaScript framework for building user interfaces.
- Vite - A fast build tool and development server.
- TypeScript - A superset of JavaScript that adds static types.
- Pinia - A state management library for Vue.js.
- Vue Router - The official router for Vue.js.
- PrimeVue - A collection of UI components for Vue.js, using raw CSS.
- Cypress - A JavaScript end-to-end testing framework.
git clone https://github.com/borgaar/grep-frontend.git && cd grep-frontend
Install pnpm if you don't have it already and run:
pnpm iYou need to add your Mapbox access token to the .env file. You can get a free API key from Mapbox.
# .env
VITE_MAPBOX_ACCESS_TOKEN=your_mapbox_access_tokenDocumentation for this can be found in the README.md here.
Note: If you are hosting the database on a different URL, you must set this variable in the .env file:
VITE_API_URL=<your_api_url>
It defaults to http://localhost:8080.
This step will generate the API clients based on the OpenAPI spec located at src/api/spec.json.
Docs for getting a new API spec can be found here.
pnpm apiPlease note: running the application as development will result in debug messages appearing for debug purposes
pnpm devpnpm build
pnpm preview
Note that you need to add the following .env variable:
VITE_TEST=trueBuild the release version of the app and run the end-to-end tests using Cypress.
pnpm build
pnpm run test:e2eThe API documentation can be found by running the backend server (instructions here) and navigating to http://localhost:8080/swagger-ui/index.html in your browser.