Skip to content

anishk85/time-capsule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Digital Time Capsule

๐Ÿ“Œ Overview

The Digital Time Capsule is an innovative web platform that allows users to store messages, media, and memories, which will be revealed at a future date. Developed during KrackHack 2025, this project focuses on **security, AI/ML-powered sentiment analysis, and a seamless user experience


๐ŸŒŸ Features

โœ… User Authentication

  • Secure signup/login with OTP verification via email.
  • JWT authentication to protect user data.

โœ… Time Capsule Management

  • Create, edit, delete, and share time capsules.
  • Set a future unlock date for messages.
  • Send capsules to loved ones via email.

โœ… Dashboard

  • Displays locked/unlocked capsules with scheduled release dates.

โœ… AI-Powered Sentiment Analysis

  • NLP-based emotion detection for messages and titles.
  • Transformers-based model (DistilBERT) trained for sentiment classification.
  • FastAPI backend deployed on Render for efficient AI/ML inference.

โœ… Play Zone (Gamification)

  • Memory Challenge ๐ŸŽฏ
  • Upcoming interactive games (to enhance engagement).

โœ… Secure Storage & Scheduled Execution

  • Cloudinary integration for secure image uploads.
  • Node-cron & Agenda for automated capsule releases.

โœ… Scalability & Performance

  • Cloud-based MongoDB Atlas for scalable data storage.
  • Optimized FastAPI backend for high-performance AI/ML predictions.

๐Ÿ›  Tech Stack

Frontend

  • React.js โ€“ UI development
  • Tailwind CSS โ€“ Responsive styling
  • Axios โ€“ API communication
  • React Router โ€“ Page navigation
  • Framer Motion โ€“ Animations

Backend

  • Node.js (Express.js) โ€“ API server
  • MongoDB Atlas โ€“ NoSQL database
  • JWT & Bcrypt.js โ€“ Secure authentication
  • Cloudinary โ€“ Media storage
  • Nodemailer โ€“ OTP verification & email services
  • Node-cron & Agenda โ€“ Automated scheduling

AI/ML Integration (FastAPI Backend on Render)

  • FastAPI โ€“ Deployed on Render for AI/ML inference.
  • Transformers & DistilBERT โ€“ Emotion detection for capsules.
  • Torch optimizations โ€“ Efficient processing of sentiment analysis.

Deployment

  • Frontend: Deployed on Vercel & Netlify.
  • Backend:
    • Express.js API on Render.
    • FastAPI AI backend on Render (for real-time sentiment classification).
  • Database: Hosted on MongoDB Atlas.

๐Ÿ“‚ Project Folder Structure

๐Ÿ“‚ project-root
โ”‚โ”€โ”€ ๐Ÿ“‚ public
โ”‚โ”€โ”€ ๐Ÿ“‚ src
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ assets
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ AuthPage.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ LoadingSpinner.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ NavFooter.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ProtectedRoute.jsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ pages
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ CapsuleDetails.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Create_Capsule.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ DashBoard.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FunZone.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ GuessTheAge.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Home.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ MemoryGame.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Signup.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Success.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ UpdateCapsule.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Verify_Signup.jsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ utils
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ App.jsx
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ index.css
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.jsx
โ”‚โ”€โ”€ ๐Ÿ“„ .env
โ”‚โ”€โ”€ ๐Ÿ“„ .gitignore
โ”‚โ”€โ”€ ๐Ÿ“„ eslint.config.js
โ”‚โ”€โ”€ ๐Ÿ“„ index.html
โ”‚โ”€โ”€ ๐Ÿ“„ package-lock.json
โ”‚โ”€โ”€ ๐Ÿ“„ package.json
โ”‚โ”€โ”€ ๐Ÿ“„ README.md
โ”‚โ”€โ”€ ๐Ÿ“„ vite.config.js

๐Ÿ“‚ Backend Folder Structure

time-capsule-backend/
โ”‚โ”€โ”€ ๐Ÿ“‚ config/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cloudinary.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ db.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ email.js
โ”‚
โ”‚โ”€โ”€ ๐Ÿ“‚ controllers/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ authController.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ capsuleController.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ myCapsuleController.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ videoController.js
โ”‚
โ”‚โ”€โ”€ ๐Ÿ“‚ middlewares/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ authMiddleware.js
โ”‚
โ”‚โ”€โ”€ ๐Ÿ“‚ models/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Capsule.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Email.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ myCapsule.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ OTP.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ User.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ video.js
โ”‚
โ”‚โ”€โ”€ ๐Ÿ“‚ routes/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ authRoutes.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ capsuleRoutes.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ myCapsuleRoutes.js
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ videoRoutes.js
โ”‚
โ”‚โ”€โ”€ ๐Ÿ“‚ tmp/
โ”‚โ”€โ”€ ๐Ÿ“‚ utils/
โ”‚โ”€โ”€ ๐Ÿ“„ .env
โ”‚โ”€โ”€ ๐Ÿ“„ .gitignore
โ”‚โ”€โ”€ ๐Ÿ“„ LICENSE
โ”‚โ”€โ”€ ๐Ÿ“„ package-lock.json
โ”‚โ”€โ”€ ๐Ÿ“„ package.json
โ”‚โ”€โ”€ ๐Ÿ“„ server.js

๐Ÿ”ง Installation & Setup

1๏ธโƒฃ Clone the Repository

git clone https://github.com/anishk85/time-capsule
cd time-capsule

2๏ธโƒฃ Set Up the Backend

cd backend
npm install

Create a .env file inside backend and add:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
EMAIL_USER=your_email
EMAIL_PASS=your_email_password
FASTAPI_URL=https://your-fastapi-url.onrender.com/analyze

Start the Express.js backend server:

npm run dev

3๏ธโƒฃ FastAPI AI Backend (Deployed on Render)

4๏ธโƒฃ Set Up the Frontend

cd ../frontend
npm install

Create a .env file inside frontend and add:

REACT_APP_BACKEND_URL=http://localhost:5000

Start the frontend server:

npm run dev

5๏ธโƒฃ Access the Application

  • Frontend: http://localhost:3000
  • Backend API (Express.js): http://localhost:5000/api

๐Ÿ“Œ How AI/ML is Integrated

  • User messages & titles are sent to the FastAPI backend for sentiment classification.
  • The DistilBERT NLP model detects emotions and enhances personalized user experiences.
  • FastAPI deployment on Render ensures scalability with optimized model inference.

๐Ÿ”ฎ Future Enhancements

๐Ÿ”น Blockchain-based storage for tamper-proof capsules.
๐Ÿ”น Multiple file uploads per capsule.
๐Ÿ”น More interactive Play Zone games.
๐Ÿ”น AI-powered content filtering & personalization.
๐Ÿ”น Role-based access control for team collaborations.


๐ŸŒŽ Scalability & Use Cases

  • Personal Journaling โ€“ Store emotions and thoughts for future reflection.
  • Event Time Capsules โ€“ Send messages for anniversaries, birthdays, and special events.
  • Corporate Memory Storage โ€“ Preserve company milestones for future employees.
  • Education & History Archives โ€“ Store historical content with AI-driven insights.

๐Ÿ“Œ Conclusion

The Digital Time Capsule integrates AI-powered sentiment analysis with secure, time-based memory storage, creating a unique and engaging user experience. Built during KrackHack 2025, this project is a fusion of web development, AI/ML, and cloud technologies.


๐Ÿ”ฅ Developed by 404 BRAIN NOT FOUND @ KrackHack 2025 ๐Ÿš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors