Skip to content

Commit a1953fd

Browse files
committed
finalize readme of main project and fe and be readme adjustments
1 parent 5627db9 commit a1953fd

File tree

8 files changed

+80
-130
lines changed

8 files changed

+80
-130
lines changed

README.md

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
Bookmarks.dev is a bookmark manager created and designed primarily for Developers & Co. It helps you [save time and nerves
33
when managing your dev bookmarks](https://dev.to/ama/how-i-manage-my-dev-bookmarks-and-save-time-and-nerves-56ae) and eases
44
[bookmarking of code snippets via Codelets](https://dev.to/ama/bookmarking-code-snippets-with-codelets-3d44). Check our
5-
[HowTo](https://www.bookmarks.dev/howto) page to help you get started.
5+
[HowTo](https://www.bookmarks.dev/howto) page to help you get started:
66

7-
Most worthy public bookmarks are published regularly on Github in a [separate repository](https://github.com/CodepediaOrg/bookmarks).
7+
[![Save to Bookmarks.dev chrome extension usage](https://thepracticaldev.s3.amazonaws.com/i/8ukqg9jfexbohtbkv7gt.gif)](https://www.bookmarks.dev/howto)
8+
9+
> Most worthy public bookmarks are published regularly on Github in a [separate repository](https://github.com/CodepediaOrg/bookmarks).
10+
11+
***
812

913
## Getting started
1014
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
@@ -14,7 +18,7 @@ The project is developed with the MEAN stack and [Keycloak](http://www.keycloak.
1418

1519
The project contains two parts
1620
* [frontend](frontend) which makes up the User Interface. This uses with Angular and Angular CLI.
17-
* [backend](backend) which is the API supporting the UI. This uses ExpressJS with MongoDB and Keycloak.
21+
* [backend](backend) which is the API supporting the UI. It uses ExpressJS with MongoDB and Keycloak. See the [OpenAPI specification](https://www.bookmarks.dev/api/docs)
1822

1923
### Prerequisites
2024

@@ -81,11 +85,47 @@ loaded with your account and you can start playing with them.
8185
> You can create your own test user, or any other extra users by following the screenshots in
8286
> [Add a Keycloak user](documentation/keycloak/add-keycloak-user.md) to create it.
8387
88+
## Testing
89+
### Backend
90+
### Integration tests
91+
92+
> Keycloak and mongodb have to be started as specified above (`docker-compose up` command)
93+
94+
Run the integration test by issuing the following command.
95+
96+
```bash
97+
cd backend;
98+
npm run integration-tests
99+
```
100+
101+
A report will be generated.
102+
103+
## Debugging
104+
### Frontend
105+
#### Dev Tools in Chromium browsers
106+
You can use the Dev Tools in Chromium based browsers (e.g. Chrome, Brave). Navigate to **Sources** and the file you want to set
107+
your break points, like in the following example:
108+
109+
![chrome-dev-tools-debugging](documentation/debugging/frontend/debug-frontend-chrome-dev-tools.png)
110+
111+
#### IntelliJ
112+
In IntelliJ you add Javascript Debug configuration as shown below:
113+
114+
![Intelli-frontend-debugging](documentation/debugging/frontend/debug-frontend-intellij.png)
115+
116+
### Backend
117+
#### IntelliJ / Webstorm (Node.js plugin is required)
118+
The ``npm run debug`` starts nodemon with the `--inspect` parameter so you can attach to this process, by using the following configuration:
119+
![nodejs-remote-debugging](documentation/debugging/backend/attach-to-nodemon-process.png)
120+
121+
122+
#### Visual Studio Code
123+
See [Node.js debugging in VS Code with Nodemon](https://github.com/microsoft/vscode-recipes/tree/master/nodemon)
124+
84125
## Contributing
85126
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
86127

87128
## Versioning
88-
89129
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/CodepediaOrg/bookmarks.dev/tags).
90130

91131
## License

backend/README-backend.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Backend
2+
Back-end REST API for [www.bookmarks.dev](http://www.bookmarks.dev).
3+
## OpenAPI Docs
4+
5+
The API has an OpenAPI specification available at [docs/openapi/openapi.yaml](docs/openapi/openapi.yaml)
6+
7+
Based on that a GUI is generated to test the API directly from browser:
8+
* [local](http://localhost:3000/api/docs)
9+
* [production](https://www.bookmarks.dev/api/docs)
10+
11+
## Deployment
12+
We currently use [pm2](https://pm2.keymetrics.io/) to start the project in production.
13+
14+
### Start
15+
```bash
16+
pm2 start pm2-process.json --env production
17+
```
18+
19+
> Commited is a [pm2-process.exammple.json](pm2-process.exammple.json) example file
20+
21+
### Restart
22+
```bash
23+
pm2 restart pm2-process.json --env production
24+
```
25+
26+
### Stop
27+
```bash
28+
pm2 stop pm2-process.json --env production
29+
```
30+
31+

backend/README.md

Lines changed: 0 additions & 104 deletions
This file was deleted.
-232 KB
Binary file not shown.
192 KB
Loading
355 KB
Loading
115 KB
Loading
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
# Source code for bookmarks.dev - the Bookmark Manager for Developers & Co
2-
3-
<img align="left" src="src/assets/bookmarks.dev-logo-md.png">
4-
5-
Efficiently manage your dev bookmarks. The public and worthy ones are published on Github
6-
at [https://github.com/CodepediaOrg/bookmarks](https://github.com/CodepediaOrg/bookmarks#readme)
7-
8-
---
9-
10-
Built with [Angular](https://angular.io/) and [Angular CLI](https://cli.angular.io/)
11-
12-
![components-graph](documentation/graphviz/components-graph.png)
13-
14-
> The production setup is can be found here - [components production](https://raw.githubusercontent.com/wiki/CodepediaOrg/bookmarks-api/images/network-diagram.png)
15-
1+
# Frontend
2+
The User Interface (frontend) is built with [Angular](https://angular.io/) and [Angular CLI](https://cli.angular.io/)
163

174
***
185

@@ -27,6 +14,8 @@ These instructions will get you a copy of the project up and running on your loc
2714

2815
This project was generated with [Angular CLI](https://github.com/angular/angular-cli)
2916

17+
> Change to the `frontend` folder before running any of the commands bellow - `cd frontend`
18+
3019
### Development server
3120

3221
Run `ng serve` for a dev server. Navigate to [`http://localhost:4200/`](http://localhost:4200). The app will automatically reload if you change any of the source files.
@@ -58,12 +47,6 @@ Run `ng build` to build the project. The build artifacts will be stored in the `
5847

5948
I use an alias for that
6049
```shell
61-
alias bookmarks-build-aot='cd ~/projects/dev/personal/bookmarks/bookmarks.dev; rm -rf dist*; nvm use; npm run build:aot'
50+
alias bookmarks-build-aot='cd ~/projects/dev/personal/bookmarks/bookmarks.dev/frontend; rm -rf dist*; nvm use; npm run build:aot'
6251
```
6352

64-
## Contributing
65-
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.
66-
67-
## License
68-
69-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

0 commit comments

Comments
 (0)