A personal database of people, events and blogs. The REST API is used to:
- send notifications when birthdays are coming up on the current day
- to get all the events from the database synched with Google Calendar automatically
- to edit/publish blogs to my portfolio website.
This project uses yarn. In order to run this project, you will need to have yarn
installed.
Available commands:
yarn run dev
: used to run the project locally, in a dev environmentyarn run test:unit
: used to run all tests (integration and functional)yarn run build
: used to build a production ready artifact
The REST API is written in TypeScript. It was developed in a Test-Driven-Development manner to make sure endpoints are working accordingly and good practices are endorsed. The REST API is concerned only with adding/removing/updating/getting information about people and events from the Mongo Database, while also managing the blogs repository used in my portfolio website.
- Person
- CRUD operations
- GET 'person/info/birthdays': Getting list of persons with current date birthday
- Event
- CRUD operations
- GET '/event/info/latest': Getting list of events added in the past hour
- Blog
- PUT 'blog/save': used to create/update blog. This endpoint will used the submodule
Blogs
to create a new branch with the blog's title, saving the blogs information to a.md
file and adding/commiting/pushing changes to git. - PUT 'blog/post': used to update blog and merging submodule to main. This endpoint will update the blog's content and will merge its branch with main. The aforementioned portfolio website will fetch the github repository of blogs and will get the latest added blogs.
The Notification Microservice has been developed in GoLang and its sole purpose is to notify the user, once a day, about any birthday or event happening on that day. It has not been developed in TDD manner because of my inexperience with GoLang. However, tests will be added in the future.
The Calendar Microservice has been developed in GoLang and it is concerned with fetching the events added in the past hour and adding them to the Google Calendar of my account. This microservice does currently not contain tests.
The Kotlin Android app has been created to have the flexibility and commodity of editing and publishing blogs from my phone. For more information about its purpose, structure and running steps please vitit the repository
- TypeScript - Used to write the REST API part of the project
- GoLang - Used to write the microservices.
- Kotlin - Used to build the android app
- MongoDB - Was chosen because of the easy set-up, cloud based host and benefits of the Document based queries.
- Express - Used to set up the REST API endpoints
- Supertest + Jest - Used to create and run TypeScript tests
- Beeep - Used to sent Windows Notifications
- Google Calendar API - Used to update personal calendar events
- Shelljs - Used to execute shell commands for the blog creation and publication (e.g. it is used to call
awk
andgit
from the NodeJS REST API)