Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Personal Cloud Assistant

A serverless note and file management application built with React and AWS, featuring secure authentication and cloud storage.

🚀 Live Demo: https://main.d1xrjjt0e3swym.amplifyapp.com/

Note: First-time users need to sign up to access the app.

📋 Project Overview

Personal Cloud Assistant is a full-stack web application that allows users to create and manage notes and upload/store files securely in the cloud. Built entirely on AWS serverless infrastructure for scalability, reliability, and cost efficiency.

🎯 Core Features

Notes Management

  • Create, read, edit, and delete notes
  • Real-time search functionality
  • Automatic timestamps (creation/update)
  • Beautiful masonry grid layout
  • Inline editing with save/cancel

File Management

  • Upload files (any type)
  • Download with secure presigned URLs
  • Delete files with confirmation
  • File metadata (size, upload date)
  • Real-time search by filename
  • Clean filename display (timestamp hidden)

User Dashboard

  • View recent activity
  • Quick access to notes and files
  • Responsive design for mobile and desktop

Monitoring Dashboard

  • Real-time CloudWatch metrics tracking
  • View Notes & Files operation metrics
  • Request duration and error monitoring
  • Auto-refresh every 60 seconds
  • Admin-only access (configured via REACT_APP_ADMIN_EMAIL)
  • Navigate to /monitoring endpoint

🏗️ Architecture

Frontend: React 19.2 SPA with React Router 7.10

Backend: AWS Serverless Services

☁️ AWS Services Used

Service Purpose Details
Lambda Serverless compute 2 functions: notes and files handlers
API Gateway REST API HTTP API for all backend endpoints
DynamoDB Database NoSQL storage for notes with user partitioning
S3 File storage Secure file uploads with presigned download URLs
Cognito Authentication User sign-up, login, and JWT token management
CloudWatch Monitoring Custom metrics, logs, and health tracking
IAM Access control Least-privilege roles for Lambda functions
Amplify Frontend framework Authentication UI components and SDK

🚀 Getting Started

Prerequisites

  • Node.js v16+
  • npm or yarn
  • AWS Account with CLI configured
  • Git

Installation

  1. Clone and install
git clone <repo-url>
cd personal-cloud-assistant
npm install
  1. Configure AWS Resources

Create the following in your AWS account:

  • DynamoDB Table: Notes (partition key: noteId)
  • S3 Bucket: For file storage (block public access)
  • Cognito User Pool: Email-based authentication
  • Cognito Identity Pool: For service access
  • Lambda Functions: Deploy the two handler files (notes and files)
  • API Gateway: HTTP API with routes to Lambda
  • IAM Roles: Lambda execution roles with required permissions
  1. Set Environment Variables

Create .env file:

REACT_APP_USER_POOL_ID=your_pool_id
REACT_APP_USER_POOL_CLIENT_ID=your_client_id
REACT_APP_IDENTITY_POOL_ID=your_identity_pool_id
REACT_APP_S3_BUCKET=your_bucket_name
REACT_APP_AWS_REGION=ap-south-1
REACT_APP_API_ENDPOINT=your_api_gateway_url
[email protected]
  1. Start Development Server
npm start

Opens at http://localhost:3000

📁 Project Structure

src/
├── components/
│   ├── Dashboard.js          # Home page with activity
│   ├── CreateNote.js         # Note creation form
│   ├── ViewNotes.js          # Notes & files viewer
│   ├── Monitoring.js         # CloudWatch dashboard (admin-only)
│   └── *.css                 # Component styles
├── App.js                    # Routing and main layout
├── api.js                    # API calls with auth
├── aws-exports.js            # AWS config
└── index.js                  # Entry point

lambda-files-handler.mjs      # Files Lambda
lambda-notes-handler.mjs      # Notes Lambda

🔧 Lambda Functions

Deploy these handler files to Lambda:

Notes Handler

  • File: lambda-notes-handler.mjs
  • Endpoint: /notes
  • Operations: GET (list), POST (create), DELETE (by ID)
  • Storage: DynamoDB
  • Metrics: Tracks operation counts, durations, errors

Files Handler

  • File: lambda-files-handler.mjs
  • Endpoint: /files
  • Operations: GET (list), POST (upload), DELETE (by ID), GET download URL
  • Storage: S3 with presigned URLs (1-hour expiration)
  • Features: Base64 upload support, metadata tracking

🔐 Security

  • Authentication: JWT tokens via Cognito
  • Authorization: IAM roles with least-privilege policies
  • Encryption: Data encrypted at rest (DynamoDB, S3)
  • Presigned URLs: Time-limited, signed access to S3 objects
  • CORS: Configured for secure cross-origin requests
  • Credentials: Environment variables (never committed)
  • Admin Access: Monitoring dashboard is restricted to admin users only (configured via REACT_APP_ADMIN_EMAIL). Only the user with the admin email can view metrics at /monitoring

🎨 UI/UX Highlights

  • Animated gradient background
  • Glassmorphism design with backdrop blur
  • Pinterest-style masonry grid layout
  • Responsive mobile-first design
  • Smooth animations and transitions
  • Icon-only compact buttons (32x32px)
  • Beautiful modals with animations
  • Real-time search functionality
  • Loading states and feedback

📦 Build & Deploy

# Production build
npm run build

# Deploy options:
# - AWS Amplify Console (auto CI/CD)
# - S3 + CloudFront (static + CDN)
# - Traditional hosting (Netlify, Vercel, etc.)

📊 CloudWatch Metrics

Custom metrics published by Lambda functions:

Namespaces:

  • PersonalCloudAssistant/Notes
  • PersonalCloudAssistant/Files

Tracked: Operation counts, request duration, error counts

🧪 Testing

npm test              # Run tests
npm test -- --coverage  # With coverage report

📝 Environment Variables

See .env.example for complete configuration template.

⚠️ Important: Never commit .env file (already in .gitignore)

🔮 Future Enhancements

  • Note categories/tags
  • Advanced search filters
  • Markdown support
  • Dark mode
  • Multi-user collaboration
  • Export to PDF
  • Scheduled reminders
  • Mobile app (React Native)

🤝 Contributing

I'm open to collaborations and contributions! If you have ideas for enhancements or would like to work together on improving this project, feel free to:

  • Open an issue to discuss new features
  • Submit a pull request with improvements
  • Reach out for collaboration opportunities

📧 Support

For issues or questions, open an issue in the repository.


Built with React & AWS | Serverless Architecture | Cloud-Native Application

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages