The ultimate Personal Life-Document & Deadline Guardian System
LifeDoc solves a critical real-world problem: People forget where their important documents are and miss crucial expiry or renewal deadlines — resulting in financial, legal, and emotional stress.
LifeDoc acts as a highly secure digital vault, keeping your family's most important documents meticulously organized and proactively monitoring them for upcoming expirations to grant you total peace of mind.
- Secure Digital Vault: Safely store, search, and categorize all your critical documents in one centralized ecosystem.
- Expiry Radar & Proactive Alerts: Advanced background cron jobs autonomously monitor document expiration dates and dispatch Smart Alerts at 30, 14, 7, and 1 days prior to deadlines. Never miss a renewal again.
- Emergency Family Access: Securely grant vault access to family members. Features a robust approval workflow mapping structured relational states (Pending, Approved, Revoked).
- Comprehensive Admin Dashboard: Complete administrative oversight including real-time storage metrics, active vault tallies, document moderation, and instant user access controls.
- Stunning UI Architecture: Built with a modern Glassmorphism design system powered by Tailwind CSS. Features high-performance, scroll-driven hero animations engineered using GSAP and Framer Motion.
- 2FA & Email Services: Implements secure OTP based login for 2-Factor Authentication utilizing customized email dispatches.
- Core Runtime: Node.js & Express.js
- Database: PostgreSQL (interfaced via
pg) with automated schema migrations across complex relations. - Security Checksums: JWT for robust route authentication,
bcryptjsfor strict password hashing. - File & Image Processing:
multerhandling secure multipart-form data,pdf-parse&tesseract.jsfor text extraction. - Background Jobs:
node-cronexecuting automated expiration sweeps.
- Framework: React 18
- Styling: Tailwind CSS
- Interactivity: Framer Motion & GSAP for timeline sequencing.
- API Connectivity: Axios interceptors automatically injecting JWT signatures across all internal HTTP requests.
Before running this project, ensure you have the following installed on your machine:
- Node.js: Download from nodejs.org.
- PostgreSQL: Download and configure from postgresql.org.
-
Database Configuration
- Open your PostgreSQL command line tool (
psql) or a graphical client (like pgAdmin). - Create a new, empty PostgreSQL database for the project (e.g.,
lifedoc).
- Open your PostgreSQL command line tool (
-
Environment Variables
- In the root of this project folder, create a new file named
.env. - Copy the contents from
.env.exampleand fill in your actual values:
# Database Configuration DB_HOST=localhost DB_PORT=5432 DB_NAME=lifedoc DB_USER=your_postgres_username DB_PASSWORD=your_postgres_password # JWT Secret (IMPORTANT: Use the same secret across all deployments) JWT_SECRET=2a1d454ef0700f4a0e08b7523df38f4b03884092e4f8c412af6a26d0329aa8c34571f19c8a34494594c30cbaa5835c087348e4597cb1dc31137e7aa2968ed2aa # Email Configuration (optional) EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 EMAIL_USER=your_email@gmail.com EMAIL_PASS=your_app_password # Server Configuration PORT=5000 NODE_ENV=development
IMPORTANT FOR COLLABORATORS:
- Get the actual
.envfile from the project maintainer - Ensure the JWT_SECRET is exactly the same across all instances
- Update database credentials to match your local PostgreSQL setup
- In the root of this project folder, create a new file named
Navigate to the root directory of this project in your terminal and install the required Node dependencies.
npm installTroubleshooting: If the project fails to start with "Cannot find module" errors (e.g.,
pdf-parse,pg), ensure yournpm installfinished successfully. You may need to deletenode_modulesandpackage-lock.jsonand reinstall if corruption occurred.
If you downloaded this project as a ZIP file from GitHub, follow these steps:
-
Create the uploads directory (missing from zip):
mkdir uploads
-
Get the .env file from the project maintainer - this contains database credentials and JWT secret
-
Install dependencies:
npm install
-
Create your database in PostgreSQL with the name specified in your
.envfile -
Run the application:
npm run dev
Common Issues & Solutions:
- "Cannot find module" errors: Run
npm installto install missing dependencies - Database connection errors: Check your PostgreSQL credentials in
.envfile - Authentication errors: Ensure JWT_SECRET matches the maintainer's exactly
- Upload errors: Make sure the
uploads/directory exists and is writable
This project utilizes a highly decoupled architecture, requiring both the Node.js API and the React Client to be served. For convenience, the package.json includes a concurrent script.
To launch the entire stack simultaneously, execute:
npm run devThis command automatically boots the Express backend on Port 5000 and serves the React frontend Application on Port 3000.
Once the startup sequence completes, open your web browser and navigate to: http://localhost:3000
- Cryptographic Hashing: Passwords secured via bcrypt.
- Stateless Sessions: JWT token-based authentication.
- Input Sanitization: File upload validation pipelines explicitly rejecting malicious configurations.
- SQL Protection: Forced Parameterized Queries across all native
pgtransactions to inherently block SQL injection vectors. - Access Control: Strict
ProtectedRoutewrapper hierarchy denying render trees to unauthorized users.
MIT Licensed. Designed and meticulously structured to handle massive scalability, real-world constraints, and the highest standards of production security for life's most precious documents.