Skip to content

Layonj3000/Dog-APP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dog App 🐾

📜 Description

This is a web application project built with Node.js and Express that allows users to search for random dog breed images. The application uses the public Dog CEO API to fetch dog breed images. The project is also configured to run in Docker and is hosted on AWS cloud.

✅ Features

  • Search Dog Breed Images: Users can type or select a dog breed and get a random image of that breed.
  • Dog Breed Auto-complete: The application provides breed suggestions as the user types.
  • New Responsive Design: Interface optimized for different devices, with modern styling.

🚀 Development

📂 Folder Structure

├── src
│   ├── controllers
│   │   ├── dogController.js      # Logic for fetching dog images
│   │   └── homeController.js     # Logic for rendering the homepage
│   │
│   ├── middlewares
│   │   └── notFound.js           # Middleware for handling 404 errors
│   │
│   ├── public
│   │   └── styles.css            # CSS styling file
│   │
│   ├── routes
│   │   └── rotas.js              # Application route definitions
│   │
│   ├── templates
│   │   └── 404.ejs               # Template for 404 page
│   │
│   └── views
│       └── index.ejs             # EJS template for the homepage
├── app.js                        # Node.js server code
│
├── docker-compose.yml            # Docker Compose configuration
│
├── Dockerfile                    # Docker configuration
│
├── package.json                  # Project dependencies
│
└── package-lock.json             # Exact versions of dependencies

⚙️ Technologies Used

  • Node.js: JavaScript runtime environment
  • Express: Web framework for Node.js
  • EJS: Template engine for rendering HTML pages
  • Axios: HTTP client for making API requests
  • Docker: For containerizing the application
  • Docker Compose: For orchestrating Docker containers

💻 Running the Application Locally

Prerequisites:

  • Node.js or Docker and Docker Compose

Steps to run the application

  • Clone the repository:
git clone https://github.com/Layonj3000/Dog-APP.git
  • If you prefer running with Node.js, install the dependencies and start the project:
npm install
node app.js
  • Or if you prefer running with Docker, build the Docker image and run the container:
docker-compose build
docker-compose up

🌐 AWS Architecture

  • The step-by-step guide for deploying the application to AWS can be found at: Link

  • The image below illustrates the architecture. The web application is packaged as a Docker image and stored in an ECR repository. The image is pulled from ECR to an EC2 instance. The user interacts with the application via the internet through a public IPv4 address, and the application makes requests to an external API (Dog API) to fetch data. The Internet Gateway enables communication between the EC2 instance and the internet.

👨‍💻 Authors

About

A web application built with Node.js and Express that allows users to fetch random images of dog breeds. The app uses the public Dog CEO API to retrieve dog breed images. The project is containerized with Docker and deployed on AWS cloud.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors