Objective
Develop a Cloud Software as a Service (SaaS) application called Piazza, a Twitter-like RESTful platform where users can post, browse, and interact with messages on specific topics. The project involves building and deploying the service in virtualized environments using Node.js, [login to view URL], MongoDB, and Docker.
Deliverables
Fully functional Piazza SaaS application.
Source code uploaded to a GitHub repository.
Documentation covering setup, API design, and testing.
Virtual Machine (VM) deployment using Docker.
Testing scripts with automation and manual test cases.
Technical report describing the implementation.
Required Features
Authentication:
Implement OAuth v2 and JSON Web Tokens (JWT) for user authorization.
Allow authorized users to access resources, post messages, and interact with posts.
Validate user inputs (e.g., posts, comments).
RESTful API Endpoints:
Create Post: Allow users to create posts with a title, topic, body, and expiration time.
Browse Posts: Fetch posts filtered by topic.
Interact with Posts: Enable liking, disliking, and commenting on posts.
History & Analytics: Fetch expired posts and find the most active post per topic.
Database Design:
Use MongoDB to manage posts, users, and interactions.
Include fields such as post ID, title, topic, timestamp, expiration time, likes, dislikes, comments, and owner information.
Post Status:
Mark posts as "Live" or "Expired" based on expiration time.
Restrict interactions (e.g., likes, dislikes) on expired posts.
Test Cases:
Automate test cases (e.g., user registration, posting, liking, browsing).
Include scenarios like unauthorized access attempts and expired post interactions.
Project Phases
Phase A: Virtualized Environment Setup
Install Node.js, MongoDB, and dependencies on a virtual machine.
Deploy the project using GitHub and make endpoints accessible via the VM's IP.
Provide documentation of the setup process, folder structure, and screenshots.
Phase B: Authentication & Validation
Implement user management with Node.js.
Authenticate users using JWT for every API call.
Add validation checks to sanitize and validate user inputs.
Phase C: RESTful API Development
Develop RESTful endpoints to support the required functionalities:
Post creation, retrieval, liking, disliking, commenting, and history browsing.
Follow REST principles for API design.
Ensure only authorized users can access the API.
Phase D: Application Testing
Use Postman to manually test all endpoints and document results.
Automate test cases using tools like Mocha or Python scripts.
Include sample scenarios like:
Unauthorized access failure.
Expired post interaction failure.
Liking, disliking, and commenting workflows.
Phase E: Deployment Using Docker
Create a Dockerfile to containerize the application.
Push the Docker image to DockerHub.
Deploy the application on a virtual machine using Docker.
Document deployment steps with screenshots.
Phase F: Technical Report
Write a concise report including:
Architecture overview.
API documentation with example requests/responses.
Database schema.
Testing methodology and results.
Deployment steps and future improvements.
Phase G: Quality Code Submission
Follow clean coding practices with proper indentation and comments.
Ensure code readability and adherence to REST principles.
Use a consistent naming convention for variables, functions, and APIs.
Additional Details
Topics for Posts: Politics, Health, Sport, Tech.
Post Fields: Title, topic, message body, timestamp, status, expiration time, owner, likes, dislikes, comments.
Testing Scenario: Use case examples provided in the document (TC1–TC20).
Tools & Frameworks:
Backend: Node.js, Express.js.
Database: MongoDB.
Deployment: Docker, GitHub, Google Cloud VM.
Testing: Postman, Mocha/Chai (optional Python scripts).
Expected Workflow
Set Up & Planning:
Discuss and finalize the project structure.
Set up the virtualized environment.
API Development:
Develop and test each endpoint incrementally.
Validate APIs using Postman.
Authentication Integration:
Implement and test JWT-based user authentication.
Testing & Automation:
Create and execute manual/automated test cases.
Deployment:
Dockerize the application and deploy it on a Google Cloud VM.
Document deployment steps and provide access to the deployed instance.
Documentation & Submission:
Prepare the technical report.
Submit source code, Dockerfile, and any related files to GitHub.
Success Criteria
Functionality: All required features implemented and functional.
Security: Proper user authentication and input validation.
Scalability: Well-structured APIs with a clear database design.
Documentation: Comprehensive and easy-to-follow technical report.
Testing: All test cases passed successfully.
Deployment: Application deployed on a virtual machine with Docker.