CS4455 – EPIC
EPIC FileShare Project
- Network Risk Mitigation Corp
- Dara Heaphy (23369914)
- Tomas Deane (23363258)
- Naem Haq (23379243)
- Tiernan Scully (23365528)
- Daniel Moody (23370157)
FileShare is a secure, end-to-end encrypted file-sharing platform with both a Qt desktop client and a JavaScript web client. It emphasises confidentiality, integrity and authenticity, even if the server or network is compromised.
-
Backend Server
- Exposes a RESTful API for authentication, file management and sharing.
- Implemented in REACT typescript.
-
Qt Client (C++)
- Native desktop application.
- Demonstrates modern C++ features (OOP, templates, smart pointers, etc.)
-
Web Client (JavaScript)
- Browser-based SPA.
- Uses Web Crypto API and up-to-date security headers.
-
Prerequisites
- Node.js (v16 or higher)
- npm (v7 or higher)
-
Installation
# Navigate to the web client directory cd fileshareweb # Install dependencies npm install
-
Configuration
- Create a
.envfile in thefilesharewebdirectory with the following variables:REACT_APP_API_URL=http://localhost:3000 REACT_APP_WS_URL=ws://localhost:8000
- Create a
-
Running the Development Server
# Start the development server npm run start:httpsThe application will be available at
http://localhost:3000 -
Building for Production
# Create a production build npm run buildThe build output will be in the
builddirectory -
Running Tests
# Run the test suite npm test
-
Troubleshooting
- If you encounter SSL certificate issues, ensure the certificates are properly placed in the
ssldirectory - For dependency issues, try clearing the npm cache:
npm cache clean --force rm -rf node_modules npm install
- If you encounter SSL certificate issues, ensure the certificates are properly placed in the
-
Prerequisites
- Qt 6.9 or higher
- QMake 3.16 or higher
- C++ compiler (MSVC, GCC, or Clang)
- OpenSSL development libraries
-
Installation
# Navigate to the Qt client directory cd fileshareqt # Create build directory mkdir build cd build # Configure the project cmake .. # Build the project cmake --build .
-
Configuration
- SSL certificates should be placed in the
ssldirectory:client.crt- Client certificateclient.key- Client private keyca.crt- CA certificate
- SSL certificates should be placed in the
-
Running the Application
# From the build directory ./FileShareQt -
Development with Qt Creator
- Open
fileshareqt.proin Qt Creator - Configure the project with your preferred kit
- Build and run directly from Qt Creator
- Open
-
Troubleshooting
- If SSL certificate errors occur:
- Verify certificate paths in the application
- Ensure certificates are in the correct format
- For build errors:
- Check Qt and CMake versions
- Verify all dependencies are installed
- Clean build directory and rebuild:
rm -rf build/* cmake .. cmake --build .
- If SSL certificate errors occur:
-
Project Structure
controllers/- Business logic and API communicationmodels/- Data models and structuresviews/- UI components and layoutsutils/- Utility functions and helpersstyles/- Application styling and themes
-
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
- OpenSSL for certificate generation
- MySQL Server (for database)
- Required Python packages (automatically installed via requirements.txt):
- Flask and extensions (Web framework)
- SQLAlchemy (Database ORM)
- PyMySQL (MySQL connector)
- cryptography (Cryptographic operations)
- JWT (Authentication)
- bcrypt (Password hashing)
- python-magic (File type detection)
-
Installation
# Navigate to the cloud server directory cd cloud # Create and activate virtual environment (recommended) python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt
-
Configuration
- SSL certificates should be placed in the
ssldirectory:server.crt- Server certificateserver.key- Server private keyca.crt- CA certificate
- Database configuration in
server.py:DATABASE_URL = "postgresql://username:password@localhost:5432/fileshare"
- SSL certificates should be placed in the
-
Running the Server
# Start the server python server.pyThe server will be available at
https://localhost:8000 -
API Endpoints
- Authentication:
- POST
/auth/login- User login - POST
/auth/register- User registration
- POST
- Files:
- GET
/files- List files - POST
/files/upload- Upload file - GET
/files/download/{file_id}- Download file - DELETE
/files/{file_id}- Delete file
- GET
- Sharing:
- POST
/files/share- Share file - GET
/files/shared- List shared files - DELETE
/files/share/{share_id}- Revoke share
- POST
- Authentication:
-
Troubleshooting
- SSL certificate issues:
- Verify certificate paths and permissions
- Check certificate validity and expiration
- Database connection errors:
- Verify MySQL is running
- Check database credentials
- Ensure database exists
- Port conflicts:
- Check if port 8000 is available
- Modify port in server configuration if needed
- SSL certificate issues:
-
Development
- Enable debug mode in
server.py:DEBUG = True
- Logging configuration:
LOG_LEVEL = "DEBUG"
- Enable debug mode in
-
Security Considerations
- Keep SSL certificates secure
- Regularly update dependencies
- Monitor server logs for suspicious activity
- Implement rate limiting for API endpoints
- Use strong password policies