|
| 1 | +<!-- PROJECT LOGO & DESCRIPTION --> |
| 2 | + |
| 3 | +<div align="center"> |
| 4 | + <img src="https://avatars.githubusercontent.com/u/66801808?s=200&v=4g" alt="Description of image" width="100"/> |
| 5 | + <br> |
| 6 | + <h1>Amplify Front-End</h1> |
| 7 | + <p> |
| 8 | + Amplify is an open-source app created for users to take the initiative in being part of an actionable step in the efforts to protect against climate change. The user is able to choose a climate campaign, then using their zip code, they will be able to select a representative of their choice. The user then donates to have their letter sent out by Amplify |
| 9 | + </p> |
| 10 | + <p> |
| 11 | + This repository houses the source code for the Amplify front-end. It uses |
| 12 | + <a href="https://vuejs.org/"><strong>Vue 3</strong></a> |
| 13 | + and |
| 14 | + <a href="https://vuetifyjs.com/en/"><strong>Vuetify</strong></a>. |
| 15 | + </p> |
| 16 | +</div> |
| 17 | + |
| 18 | +## Recommended IDE Setup |
| 19 | + |
| 20 | +We **highly** recommend [VS Code](https://code.visualstudio.com/) for its great plugins. The project is also setup for auto-linting with VSCode on file save! You'll need at least the [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) plugin. Once you open the source code in VSCode, some other convenient plugins should also be recommended to you. |
| 21 | + |
| 22 | +## Running the App |
| 23 | + |
| 24 | +Using Docker is the best way to run the app for development, but if you have `pnpm` installed locally you can run it like any old Vue application. **Please use only pnpm to run the project or handle dependencies!** Different tools like `yarn` and `npm` are not interoperable with `pnpm` (or each other) and will cause problems when intermingled. |
| 25 | + |
| 26 | +Once you have Docker running, you can build a container and enter it with |
| 27 | + |
| 28 | +``` |
| 29 | +./scripts/start.sh |
| 30 | +``` |
| 31 | + |
| 32 | +Once inside, run |
| 33 | + |
| 34 | +``` |
| 35 | +pnpm install |
| 36 | +``` |
| 37 | + |
| 38 | +To install the necessary packages, then run |
| 39 | + |
| 40 | +``` |
| 41 | +pnpm dev |
| 42 | +``` |
| 43 | + |
| 44 | +to start the development server. The app will run on port 8080 so make sure that is available on your local machine or you probably won't be able to access the app in your browser. |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +To exit the conainer, shut down the dev server with `ctrl + c` and you can just type `exit`. |
| 49 | + |
| 50 | +To shut down the container, use |
| 51 | + |
| 52 | +``` |
| 53 | +./scripts/stop.sh |
| 54 | +``` |
| 55 | + |
| 56 | +You may need to rebuild the container from time to time and can do that with |
| 57 | + |
| 58 | +``` |
| 59 | +./scripts/rebuild.sh |
| 60 | +``` |
| 61 | + |
| 62 | +## Testing |
| 63 | + |
| 64 | +We use Vitest for testing, which has a hot reloading feature. This means you can write a test and it will re-run when you save the test file or the source file for the code you're testing. You can start this with |
| 65 | + |
| 66 | +``` |
| 67 | +pnpm test |
| 68 | +``` |
0 commit comments