A zero-knowledge, end-to-end encrypted platform for secure note and file storage
Features • Demo • Installation • Usage • Security • Tech Stack
CodeSafe is a privacy-first web application that allows users to securely store notes and files using unique access codes. Built with a zero-knowledge architecture, the platform ensures that only users with the correct code (and optional PIN) can access their data. No user accounts required, no personal information tracked.
- 🔐 Zero-Knowledge Architecture - Your data is encrypted; we can't access it
- 🚫 No User Accounts - Access everything with just a code
- 🔒 Optional PIN Protection - Add an extra layer of security
- 📁 Multi-Format Support - Store documents, images, videos, and more
- ☁️ Cloud Storage - Files stored securely on Cloudinary
- 🎨 Modern UI - Beautiful dark glassmorphism design
- 🛡️ Server-Side Security - PIN enforcement at the server level
- Unique Access Codes: Each note/storage space is accessed via a custom code (e.g.,
mysecret123) - No Registration Required: Instant access without creating accounts
- Code Privacy: Codes are never exposed or logged
- Set optional PIN for additional security
- Server-side PIN verification (no client-side bypass)
- Session-based authentication (30-minute timeout)
- PIN update and removal features
- Protected Operations:
- View dashboard
- Save notes
- Upload files
- Download files
- Delete files
- Modify content
- ✅ End-to-end encryption for PINs
- ✅ Server-side authorization checks
- ✅ URL manipulation prevention
- ✅ Session-based access control
- ✅ Secure cookie handling (HttpOnly, Secure)
- ✅ HTTPS enforcement
- Rich Text Notes: Store and edit text content
- Character Counter: Real-time character count
- Auto-Save: Save notes with a single click
- Encrypted Storage: All notes are stored securely
📄 Documents
PDF, DOC, DOCX, TXT, RTF, ODT, PPT, PPTX, XLS, XLSX, CSV, MD, JSON, XML, YAML
🖼️ Images
JPG, JPEG, PNG, WEBP, GIF, BMP, TIFF, SVG, ICO, HEIC
🎬 Videos
MP4, MOV, MKV, WEBM, AVI, WMV, FLV, M4V, 3GP
📦 Others
ZIP, RAR, 7Z, TAR, GZ, PSD, AI, Figma, Blend, OBJ, STL, LOG, DAT
- Automatic Type Detection: Files are automatically categorized
- 50MB File Size Limit: Supports large files
- Cloud Storage: Files stored on Cloudinary CDN
- Organized Categories: Separate tabs for documents, photos, videos, and others
- Download Protection: PIN verification required for downloads
- Bulk Management: Load and manage files by type
🚫 Forbidden File Types (for security):
.exe, .bat, .cmd, .sh, .ps1, .js, .vbs, .jar, .php, .py, .rb
- Dark Glassmorphism Design: Modern, elegant UI
- Responsive Layout: Works on desktop, tablet, and mobile
- Tab-Based Navigation: Easy access to different sections
- Animated Transitions: Smooth user experience
- Real-Time Feedback: Success/error messages
- Loading Indicators: Upload progress feedback
- 📝 Notes - Write and save encrypted notes
- 📄 Documents - Upload and manage documents
- 🖼️ Photos - Store and organize images
- 🎬 Videos - Upload video files
- 📦 Others - Miscellaneous files
- 🔒 Security - PIN management and security settings
- Upload: Drag-and-drop or click to upload
- Download: Secure direct download links
- Delete: Remove individual files
- Load: View files by category
- Encrypted PINs: PINs are encrypted using .NET Data Protection
- Secure Sessions: Server-side session storage
- No Data Tracking: Zero knowledge of user content
- Self-Destruct: Permanently delete notes and all files
- Privacy First: No logs, no tracking, no monitoring
- Framework: ASP.NET Core 8.0
- Architecture: Razor Pages
- Database: SQL Server
- ORM: Entity Framework Core
- Cloud Storage: Cloudinary
- UI Framework: Razor Pages
- Styling: Custom CSS (Glassmorphism)
- JavaScript: Vanilla JS (minimal)
- Icons: Unicode Emojis
- Encryption: .NET Data Protection API
- Sessions: ASP.NET Core Session Middleware
- Authentication: Custom authorization helper
- Storage: Server-side session state
- File Storage: Cloudinary CDN
- Database: SQL Server
- Deployment: Azure (or any ASP.NET host)
- .NET 8.0 SDK
- SQL Server (or SQL Server Express)
- Cloudinary Account (free tier available)
git clone https://github.com/VigneshGazula/InstantNoteCrypt.git
cd InstantNoteCrypt/ShareItems_WebApp- Sign up for a free Cloudinary account at cloudinary.com
- Get your Cloud Name, API Key, and API Secret
- Update
appsettings.json:
{
"CloudinarySettings": {
"CloudName": "your-cloud-name",
"ApiKey": "your-api-key",
"ApiSecret": "your-api-secret"
}
}Update the connection string in appsettings.json:
{
"ConnectionStrings": {
"DefaultConnectionString": "Server=(localdb)\\mssqllocaldb;Database=CodeSafeDb;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}Or set environment variable:
# Windows
set DB_CONNECTION="Your-Connection-String"
# Linux/Mac
export DB_CONNECTION="Your-Connection-String"dotnet ef database updatedotnet runThe application will be available at https://localhost:5001
- Visit the Home Page
- Enter a Unique Code (e.g.,
mysecret123) - Click "Unlock Note"
- Start adding content!
- Navigate to 🔒 Security tab
- Click Set PIN Protection
- Enter a PIN (minimum 4 characters)
- Confirm the PIN
- Click Lock Note
-
Go to the appropriate tab:
- 📄 Documents for PDFs, Word files, etc.
- 🖼️ Photos for images
- 🎬 Videos for video files
- 📦 Others for archives and other files
-
Click Choose File or drag-and-drop
-
Click Upload
-
File is automatically categorized and uploaded to cloud storage
- Click Load Files in the appropriate tab
- Click the ⬇️ Download icon next to any file
- If PIN is set, you'll be prompted to verify it
- Go to 🔒 Security tab
- Enter current PIN
- Enter new PIN
- Confirm new PIN
- Click Update PIN
- Go to 🔒 Security tab
- Enter current PIN
- Click Unlock Note
- Go to 🔒 Security tab
- Scroll to Danger Zone
- Enter PIN (if set)
- Click Destroy Note
- All notes and files will be permanently deleted
CodeSafe implements enterprise-grade server-side security:
- ✅ Every route is protected - No client-side bypass possible
- ✅ Session-based verification - Stored server-side only
- ✅ URL manipulation blocked - Direct access redirects to PIN page
- ✅ Download protection - Files require PIN verification
- ✅ Secure sessions - HttpOnly, Secure cookies with 30-min timeout
User Request
↓
Authorization Helper (Server-Side)
↓
PIN Required?
↓
Session Verified? → YES → Access Granted
↓
NO
↓
Redirect to PIN Verification
- PINs: Encrypted using .NET Data Protection API
- Storage: Secure encryption at rest
- Transport: HTTPS enforced
- Sessions: Server-side only, never client-side
- 🚫 No user accounts - Anonymous access
- 🚫 No tracking - Zero analytics or monitoring
- 🚫 No logs - Content never logged
- 🚫 No backdoors - True zero-knowledge architecture
ShareItems_WebApp/
├── Controllers/ # API controllers (if any)
├── Entities/ # Database models
│ ├── Note.cs
│ ├── NoteFile.cs
│ └── UserContext.cs
├── Helpers/ # Utility helpers
│ ├── FileValidationHelper.cs
│ └── NoteAuthorizationHelper.cs
├── Migrations/ # EF Core migrations
├── Pages/ # Razor Pages
│ ├── Dashboard.cshtml
│ ├── Dashboard.cshtml.cs
│ ├── Index.cshtml
│ ├── Index.cshtml.cs
│ ├── VerifyPin.cshtml
│ ├── VerifyPin.cshtml.cs
│ └── Shared/
│ ├── _Layout.cshtml
│ └── _FilesList.cshtml
├── Services/ # Business logic services
│ ├── INoteService.cs
│ ├── NoteService.cs
│ ├── IFileStorageService.cs
│ ├── FileStorageService.cs
│ ├── ICloudinaryService.cs
│ ├── CloudinaryService.cs
│ └── IEncryptionService.cs
├── Settings/ # Configuration classes
│ └── CloudinarySettings.cs
├── wwwroot/ # Static files
│ ├── global-theme.css
│ └── site.css
├── appsettings.json # Configuration
└── Program.cs # Application entry point
Notes Table
CREATE TABLE Notes (
Id INT PRIMARY KEY IDENTITY,
Code NVARCHAR(255) UNIQUE NOT NULL,
Content NVARCHAR(MAX),
Pin NVARCHAR(255), -- Encrypted
CreatedAt DATETIME2 NOT NULL,
UpdatedAt DATETIME2 NOT NULL
)NoteFiles Table
CREATE TABLE NoteFiles (
Id INT PRIMARY KEY IDENTITY,
NoteId INT FOREIGN KEY REFERENCES Notes(Id),
FileName NVARCHAR(255) NOT NULL,
FileType NVARCHAR(50) NOT NULL, -- document/image/video/others
FileSize BIGINT NOT NULL,
FileUrl NVARCHAR(MAX) NOT NULL, -- Cloudinary URL
CloudinaryPublicId NVARCHAR(255),
UploadedAt DATETIME2 NOT NULL
)# Database Connection (optional, overrides appsettings.json)
DB_CONNECTION="Server=...;Database=...;..."
# Cloudinary (configured in appsettings.json){
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnectionString": "Your-SQL-Server-Connection-String"
},
"CloudinarySettings": {
"CloudName": "your-cloudinary-cloud-name",
"ApiKey": "your-cloudinary-api-key",
"ApiSecret": "your-cloudinary-api-secret"
}
}Sessions are configured in Program.cs:
builder.Services.AddSession(options =>
{
options.IdleTimeout = TimeSpan.FromMinutes(30); // 30-minute timeout
options.Cookie.HttpOnly = true; // Prevent JavaScript access
options.Cookie.IsEssential = true; // GDPR compliance
options.Cookie.SecurePolicy = CookieSecurePolicy.Always; // HTTPS only
});- Create note with unique code
- Save note content
- Upload document file
- Upload image file
- Upload video file
- Set PIN protection
- Verify PIN requirement on access
- Download file with PIN
- Update PIN
- Remove PIN
- Delete individual file
- Destroy entire note
- Attempt direct dashboard access without PIN
- Try URL manipulation to bypass PIN
- Test file download without verification
- Verify session timeout (30 min)
- Test forbidden file type upload
- Verify file size limits
- File Upload: Up to 50MB per file
- Session Timeout: 30 minutes of inactivity
- Storage: Unlimited notes (database dependent)
- CDN: Cloudinary global CDN for fast file delivery
- Scalability: Horizontal scaling supported
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow C# coding conventions
- Add XML documentation for public methods
- Update README if adding new features
- Test thoroughly before submitting PR
- Maintain security best practices
This project is licensed under the MIT License - see the LICENSE file for details.
Vignesh Gazula
- GitHub: @VigneshGazula
- Repository: CodeSafe
- ASP.NET Core - Web framework
- Entity Framework Core - ORM
- Cloudinary - Cloud storage
- SQL Server - Database
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Provide error logs and steps to reproduce
- Expiration Dates: Auto-delete notes after specified time
- Note Sharing: Share encrypted notes with others
- Multi-Language Support: Internationalization
- File Previews: In-app preview for images and PDFs
- Bulk Upload: Upload multiple files at once
- Search: Search within notes and files
- Tags: Categorize notes with tags
- Export: Download all data as ZIP
- 2FA: Two-factor authentication support
- API: RESTful API for external integrations
User Responsibility Notice:
- Users are solely responsible for the content they upload or store on this platform
- The developers do not access, monitor, or control user data
- Not responsible for any data loss or information leaks caused by user actions
- Users are strongly advised to enable PIN protection for sensitive content
- Do not upload illegal, harmful, or confidential data you are not authorized to store
Clean, modern interface with code entry
Organized tabs for different content types
Secure access control
Easy upload and download with automatic categorization
Built with ❤️ using ASP.NET Core 8.0
⭐ Star this repository if you find it helpful! ⭐