Skip to content

azdanov/prsls-online-demo

Repository files navigation

PRSLS Online Demo

Overview

This project is a serverless application built using AWS services and the Serverless Framework. It provides a web interface for users to register, sign in, search for restaurants based on a theme, and place orders. The backend is powered by AWS Lambda, DynamoDB, Cognito, and other AWS services.

Table of Contents

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (>= 18)
  • npm (Node Package Manager)
  • AWS CLI configured with appropriate permissions
  • Serverless Framework

Installation

  1. Clone the repository:

    git clone https://github.com/your-repo/prsls-online-demo.git
    cd prsls-online-demo
  2. Install the dependencies:

    npm install

Configuration

  1. Update the serverless.yml file with your custom configurations such as name, stage, and AWS region.

  2. Ensure you have the necessary AWS credentials configured in your environment.

Deployment

Deploy the application using the Serverless Framework:

sls deploy

This will deploy all the necessary AWS resources and output the endpoints and other configurations.

Usage

  1. Open the deployed web application in your browser.
  2. Register a new user by clicking on the "Register" link.
  3. Sign in using the registered credentials.
  4. Enter a theme (e.g., "rick and morty") and click "Find Restaurants" to search for restaurants.
  5. Click on a restaurant to place an order.

Testing

Run the tests using the following command:

npm test

For acceptance tests, use:

npm run acceptance

Project Structure

  • functions/: Contains the Lambda function handlers.
  • static/: Contains the static HTML, CSS, and JavaScript files for the web interface.
  • serverless.yml: Serverless Framework configuration file.
  • package.json: Node.js project configuration file.
  • README.md: Project documentation.