https://github.com/shershah010/web-diary
A personal web diary made using the MEAN stack
https://github.com/shershah010/web-diary
angularjs auth0 docker docker-compose expressjs flask mongodb nginx-proxy nodejs python3 vader-sentiment-analysis
Last synced: 5 months ago
JSON representation
A personal web diary made using the MEAN stack
- Host: GitHub
- URL: https://github.com/shershah010/web-diary
- Owner: shershah010
- Created: 2019-07-17T22:18:07.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T08:19:46.000Z (over 2 years ago)
- Last Synced: 2024-01-29T10:14:25.716Z (over 2 years ago)
- Topics: angularjs, auth0, docker, docker-compose, expressjs, flask, mongodb, nginx-proxy, nodejs, python3, vader-sentiment-analysis
- Language: TypeScript
- Homepage:
- Size: 750 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Web Diary
A personal diary web application with sentiment analysis.
## Structure
`backend/` - Handles getting and sending data to the MongoDB database. Also sends data to the models to preform sentiment analysis.
`frontend/` - Provides AAA using Auth0. Allows user to view, add, and update diary entries.
`models/` - Does sentiment analysis.
`proxy/` - Does a reverse proxy and provides `tls` using NGINX.
## Start Up Guide
1. Setup MongoDB:
1. Create a MongoDB account here: https://www.mongodb.com/.
2. Create a collection called `diary_entries` and a database called: `diary_entries_db`.
2. Setup Auth0:
1. Create an Auth0 account here: https://auth0.com/.
2. Create a new Single Page Web Application.
3. Set config files:
1. Create `backend/config.json`:
```json
{
"mongodb": {
"username": "USERNAME",
"password": "PASSWORD",
"collection": "diary_entries",
"url": "MONGO_ENDPOINT.mongodb.net"
}
}
```
2. Create `frontend/src/assets/config.json`:
```json
{
"auth0": {
"domain": "AUTH0_ENDPOINT.auth0.com",
"client_id": "CLIENT_ID"
}
}
```
3. Create `models/config.json`
```json
{
"mongodb": {
"username": "USERNAME",
"password": "PASSWORD",
"collection": "diary_entries",
"url": "MONGO_ENDPOINT.mongodb.net"
}
}
```
4. Create a certificate authority:
1. CA with OpenSSL, add this to your browser or OS.
2. `openssl req -now -nodes -out DOMAIN_NAME.csr -newkey rsa:4096 -keyout DOMAIN_NAME.key -subj 'CN=COMMON_NAME/C=COUNTRY/ST=STATE/L=LOCATION/O=ORGANIZATION'`
3. `openssl x509 -req -in DOMAIN_NAME.csr -CA /PATH/TO/CA/ca.pem -CAkey /PATH/TO/CA/ca.key -CAcreateserial -out DOMAIN_NAME.crt -days 1095 -sha256 -extfile DOMAIN_NAME.ext`
5. Add the frontend, backend, and models path into your `/etc/hosts`. Format should follow: `127.0.0.1\tyour_subject_alt.your_fake_domain.com`
6. Create a wildcard certificate that will be used for the frontend, backend, and models. Save this in `proxy/tls`.
7. Build with `docker-compose build`
8. Launch with `docker-compose up`