A modern, secure file storage and sharing application built with Vue 3 and Vite.
- 🔐 User Authentication - Register and login with session-based authentication
- 📁 File Management - Upload, download, and manage your files
- 🔗 File Sharing - Share files with other users and revoke access
- 📥 Shared Files View - See all files shared with you by other users
- 📝 Toggleable Logging - Comprehensive error logging that can be enabled/disabled
- 🎨 Modern UI - Beautiful, responsive interface with clean design
- Vue 3 - Progressive JavaScript framework
- Vite - Next-generation frontend tooling
- Pinia - State management for Vue
- Vue Router - Official router for Vue.js
- Node.js 16+ and npm
- Install dependencies:
npm install- Start the development server:
npm run devThe app will be available at http://localhost:5173
npm run buildPreview the production build:
npm run previewsrc/
├── components/ # Reusable Vue components
│ ├── AppHeader.vue # Application header with logout
│ ├── FileCard.vue # File display card
│ ├── SharedFileCard.vue # Shared file display card
│ └── ShareModal.vue # File sharing modal
├── views/ # Page components
│ ├── LoginView.vue # Login page
│ ├── RegisterView.vue # Registration page
│ └── FilesView.vue # File management page
├── stores/ # Pinia state management
│ ├── auth.js # Authentication state
│ └── files.js # Files state
├── services/ # API and utility services
│ ├── api.js # API client with error handling
│ └── logger.js # Logging service
├── router/ # Vue Router configuration
│ └── index.js
├── App.vue # Root component
├── main.js # Application entry point
└── style.css # Global styles
The app integrates with the ConceptBox backend API. See PLAN.md for the complete API specification.
- All endpoints use
POSTmethod - Base URL:
/api - Session-based authentication
- All requests/responses are JSON
Authentication:
POST /api/UserAuthentication/register- Register new userPOST /api/login- User loginPOST /api/logout- User logout
File Management:
POST /api/my-files- List user's filesPOST /api/my-shares- List files shared with userPOST /api/FileUploading/requestUploadURL- Request upload URLPOST /api/FileUploading/confirmUpload- Confirm file uploadPOST /api/download- Get download URL
Sharing:
POST /api/share- Share file with userPOST /api/revoke- Revoke file access
The app includes a comprehensive logging system that logs all API calls and errors.
Click the "📝 Logging ON/OFF" button in the header to enable or disable logging.
Logging is enabled by default and persists across sessions.
- All API requests and responses
- Error messages with context
- Upload/download operations
- Network errors
- Authentication events
Logs include timestamps and contextual information to help with debugging.
The Vite config includes a proxy for API calls. Update vite.config.js to point to your backend:
server: {
proxy: {
'/api': {
target: 'http://localhost:3000', // Your backend URL
changeOrigin: true
}
}
}Files are uploaded using a three-step process:
- Request a presigned upload URL from the backend
- Upload the file directly to cloud storage
- Confirm the upload with the backend
This approach enables direct-to-cloud uploads for better performance.
- Share files with other users by username
- Track who you've shared files with
- Revoke access at any time
- View files shared with you by other users
- See who shared each file with you
- Download shared files
- All sharing operations are logged
- Session tokens stored in localStorage
- Automatic logout on session expiration
- Protected routes require authentication
- All API errors are properly handled and logged
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
The app uses Pinia stores for state management:
authStore- Manages user sessions and authenticationfilesStore- Manages file listings and operations
All API calls include comprehensive error handling:
- Network errors
- Authentication errors
- Validation errors
- Server errors
Errors are displayed to users and logged to the console when logging is enabled.
Private project for ConceptBox.