Skip to content

TagBuilder is a microservice-based application that enables users to generate tags for their sentences. Frontend:

License

Notifications You must be signed in to change notification settings

0xt3j4s/TagBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TagBuilder

TagBuilder is a microservice-based application that enables the generation of tags for sentences. In this application, we utilize Docker containers to encapsulate and deploy each microservice independently.

Application Demo

This application has one functionality. It takes a sentence as input. Using Natural Language Toolkit (NLTK), generates tags for the sentence. The tags are then displayed to the user.

Application Demo

The application consists of three microservices, each one of specific functionality. The microservices are:

  1. sa-frontend: a Nginx web server that serves our static ReactJS application.
  2. sa-webapp: A Golang server that serves as the backend for handling the requests from the frontend.
  3. sa-logic:A Flask Application that performs tag generation.

Application Architecture

The application architecture is shown in the figure below: TagBuilder Architecture

Containerization

To enable easy deployment and scalability, each microservice in this application has been containerized using Docker. Containerized Microservices

Pre-requisites

Before running the application, ensure that you have the following installed:

  1. Nginx
  2. Golang
  3. Python

Run

Locally

To run the application locally, follow the steps below:

  1. Clone the repository:
$ git clone https://github.com/0xt3j4s/TagBuilder.git
  1. Change directory to the repository:
$ cd TagBuilder
  1. Run the following commands to start the microservices:
# a. Flask Application:
$ cd sa-logic
$ cd sa
$ pip install -r requirements.txt
$ python tag_builder.py
$ cd ..

# b. Golang Server:
$ cd sa-webapp
$ go build
$ cd ..

# c. ReactJS Application:
$ cd sa-frontend
$ npm install
$ npm run build
$ cd ..

Using Docker

If you don't have Docker installed, you can follow the instructions here.

Pull the container images from Docker Hub using the following commands:

$ sudo docker pull $DOCKER_USER_ID/tag-builder-logic

$ sudo docker pull $DOCKER_USER_ID/tag-builder-webapp

$ sudo docker pull $DOCKER_USER_ID/tag-builder-frontend

This will pull the latest images from Docker Hub and store them in your local machine.

To run the application, run the following commands:

$ sudo docker run -d -p 5010:5010 $DOCKER_USER_ID/tag-builder-logic

$ sudo docker run -d -p 8081:8081 -e PYTHON_API_URL='http://<container_ip or docker machine ip>:5010' $DOCKER_USER_ID/tag-builder-webapp

$ sudo docker run -d -p 80:80 $DOCKER_USER_ID/tag-builder-frontend

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, please create an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

TagBuilder is a microservice-based application that enables users to generate tags for their sentences. Frontend:

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published