unoffical wafrn mirror
wafrn.net
atproto
social-network
activitypub
1# Wafrn - Angular
2
3This package is the frontend of Wafrn.
4
5The frontend of Wafrn uses [Angular](https://angular.io/). Have fun doing stuff ;D
6
7- [Prerequisites](#prerequisites)
8- [Local Development](#local-development)
9- [Contributing](#contributing)
10- [License](#license)
11
12## Prerequisites
13
14Start by setting up the frontend as noted in the main `development.md` file.
15
16The frontend is developed from the main directory due to the monorepo structure of this project. As such, run the noted commands from the root directory.
17
18## Local Development
19
20You can run the development server through the command line:
21
22```bash
23npm run frontend:develop # Point to local backend
24npm run frontend:develop:prod # Point to production app.wafrn.net backend
25npm run frontend:develop:development # Point to development.wafrn.net backend
26```
27
28> [!NOTE]
29> When switching backend sources, make sure to clear your localStorage as the environment is cached
30
31If you have Nix installed, you can also run the development environment through the provided `shell.nix` file which includes Node 20.
32
33```bash
34nix-shell
35
36# Now in nix shell with Node 20 installed
37```
38
39To run the frontend pointing to the production server and immediately exit upon the command's completion, you can run:
40
41```bash
42nix-shell --command "trap 'exit' INT;npm run frontend:develop:prod"
43```
44
45In either case, when the server is set up, you should get a success message:
46
47```text
48Watch mode enabled. Watching for file changes...
49 ➜ Local: http://localhost:4200/
50 ➜ press h + enter to show help
51```
52
53## Contributing
54
55Pull requests are welcome. For major changes, please open an issue first to
56discuss what you would like to change.
57
58Merge pull requests to the `development` branch.
59
60## License
61
62[Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/)