Skip to content

Personal project, Python, Flask, React, Typescript, Tailwind CSS, Docker, Test-Driven Development, Continuous Integration

License

Notifications You must be signed in to change notification settings

clchinkc/SecureEncoder

Repository files navigation

Secure Encoder

Screen Capture

Project Statistics

Stargazers Forks Follow LinkedIn

Issues Pull Requests Contributors License

Continuous Integration Status

Codecov Codacy CodeQL CI

Supported Languages

Python Typescript

Table of Contents

Introduction

Secure Encoder is a sophisticated web application crafted to provide robust encoding and decryption capabilities using various cryptographic algorithms, including AES and RSA. The application supports a variety of operations such as Base64, Hex, UTF-8, Latin-1, ASCII, and URL encoding/decoding.

Its primary goal is to offer a user-friendly interface for secure text manipulation, catering especially to developers and security professionals who require reliable and secure methods for data manipulation in web applications. This makes it particularly useful for those who need quick encoding and decoding solutions alongside robust encryption tools to ensure data safety.

Developed using Python Flask and React, and leveraging SQLalchemy with Vite and Tailwind CSS for the front end, Secure Encoder exemplifies the effective use of test-driven development (TDD) practices, advanced data structures and algorithms, and expert deployment techniques.

Features

  • Dynamic Encoding/Decoding: Support for multiple encoding schemes including Base64, Hex, and more.
  • Encryption and Decryption: Implements AES and RSA algorithms with key management for secure data handling.
  • File Uploads: Users can upload key files needed for encryption/decoding.
  • Interactive UI: The React-based interactive UI ensures a smooth user experience.
  • Security: Implements best practices like Content Security Policy headers.

Tech Stack

Component Technology Used Description
Frontend React.js, TypeScript Interactive UI built with React
Backend Flask (Python) Server-side logic handled by Flask
CSS Framework Tailwind Styling provided by Tailwind CSS
Database sqlalchemy ORM for database interactions (if used)
CI/CD Codecov, Codacy, CodeQL Continuous integration and deployment
Containerization Docker, Docker Compose (optional) Container setup for development and production environments

Project Setup

Prerequisites

Environment Setup

  1. Clone the repository:

    git clone git@github.com:clchinkc/SecureEncoder.git
  2. Set environment variables: Update the .env file in the SecureEncoderReact directory or the src file inside SecureEncoderFlask directory if necessary.

Running the Application in Separate Terminals

Backend

  1. Navigate to the SecureEncoderFlask directory.

    cd SecureEncoderFlask
  2. Set up the backend for the first time running:

    pip install -r requirements.txt
  3. Run the Flask application:

    python run.py

    This will launch the backend on http://localhost:5000.

Frontend

  1. Open a new terminal and navigate to the SecureEncoderReact directory.

    cd SecureEncoderReact
  2. Set up the frontend for the first time running:

    npm install
  3. Start the React application:

    npm run dev

    Build and start the built application:

    npm run build
    npm run serve

    Or to run the production build on local static server:

    npx serve -s build

    This will launch the web application on http://localhost:3000 and connect it to the Flask backend.

React Frontend with Docker Compose

This project sets up a React frontend application using Docker and Docker Compose for development with hot reloading.

Prerequisites

Getting Started

Follow these instructions to get the React frontend application up and running in a Docker container.

Step 1: Build and Run the Container

Use Docker Compose to build and start the container:

docker-compose up --build

Step 2: Accessing the Application

Open your browser and navigate to:

http://localhost:3000

Stopping the Container

Open your browser and navigate to:

docker-compose down

Notes

  • Keep your cryptographic keys secure and ensure they are not exposed to unauthorized users.
  • Regularly update dependencies to mitigate vulnerabilities associated with outdated libraries.

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.