This repository contains the code for a basic e-commerce web application developed as a term assignment for the CSCI5409 course. The project is structured into two main directories: frontend
and backend
, alongside important configuration and documentation files at the root level.
- frontend/: Contains the React application setup using Vite and styled with ShadCN. This part of the project is responsible for the user interface of the e-commerce platform.
- backend/: Hosts the serverless backend implementation, including AWS Lambda functions for product listing and order processing, integrated with other AWS services like API Gateway, S3, and SNS.
- cloudformation.yaml: AWS CloudFormation template for provisioning the infrastructure required for the project.
- TermAssignment2024W.pdf: The assignment document detailing the project requirements, objectives, and evaluation criteria.
Before you begin, ensure you have the following installed on your local machine:
- Node.js (v14 or later)
- npm or yarn
- AWS CLI (configured with your AWS account)
- An AWS account with appropriate permissions to create and manage the resources defined in
cloudformation.yaml
- Navigate to the
backend
directory:cd backend
- Deploy the AWS infrastructure using CloudFormation:
aws cloudformation deploy --template-file ../cloudformation.yaml --stack-name <YOUR_STACK_NAME> --capabilities CAPABILITY_IAM
- Update any necessary configurations in your Lambda function code based on the resources created by CloudFormation.
- Navigate to the
frontend
directory:cd frontend
- Install the dependencies:
or if you're using yarn:
npm install
yarn
- Start the development server:
or with yarn:
npm run dev
yarn dev
The application should now be running and accessible at http://localhost:3000
.
Navigate to http://localhost:3000
in your web browser to view the e-commerce platform. You can browse products, add them to your cart, and simulate a checkout process that calculates totals, applies discounts and taxes, and sends a receipt via email.
Contributions are welcome! Please fork the repository and submit pull requests with any enhancements, bug fixes, or improvements.
This project is licensed under the MIT License - see the LICENSE file for details.