ZenCrypt

Peace of mind, encoded

01

Project Overview

ZenCrypt is a full-stack web application that makes secure messaging simple. Encryption transforms your readable text into an unreadable encoded format, protecting it from unauthorized eyes. Decryption reverses the process, restoring the original message—but only with the correct password. Built with Python Flask and vanilla JavaScript, ZenCrypt combines Base64 encoding with password protection in a sleek, dark-themed interface.

Password Protected

Every request requires password validation

Real-Time

Instant processing with zero latency

Premium UI

Dark theme with gold accents

02

System Architecture

The application follows a three-tier architecture with clear separation of concerns.

Client

Browser

HTML, CSS, JavaScript

User Interface
Server

Flask Backend

Python · REST API

Processes requests
Data

Stateless

No persistence

Zero data storage
03

Encryption Flow

The encryption process takes plaintext input and converts it to a Base64-encoded string.

Step 01

User Input

Type message & password

message + password
Step 02

Validate

Check inputs

Not empty
Step 03

API Request

POST /api/encrypt

{message, password}
Step 04

Authenticate

Verify password

SECRET_KEY ✓
Step 05

Base64 Encode

Convert to encoded

b64encode(message)
Step 06

Response

JSON result

SGVsbG8gV29ybGQ=
Step 07

Display

Show output

Encoded string
Python # Base64 Encoding Example import base64 message = "Hello World" message_bytes = message.encode('ascii') base64_bytes = base64.b64encode(message_bytes) encoded = base64_bytes.decode('ascii') # Result: SGVsbG8gV29ybGQ=
04

Decryption Flow

The decryption process reverses the encoding, converting a Base64 string back to plaintext.

Step 01

User Input

Paste encoded text

SGVsbG8gV29ybGQ=
Step 02

Validate

Check inputs

Not empty
Step 03

API Request

POST /api/decrypt

{message, password}
Step 04

Authenticate

Verify password

SECRET_KEY ✓
Step 05

Base64 Decode

Convert to plaintext

b64decode(encoded)
Step 06

Response

JSON result

Hello World
Step 07

Display

Show output

Plaintext message
Python # Base64 Decoding Example import base64 encoded = "SGVsbG8gV29ybGQ=" encoded_bytes = encoded.encode('ascii') message_bytes = base64.b64decode(encoded_bytes) decoded = message_bytes.decode('ascii') # Result: Hello World
05

Tech Stack

Modern technologies chosen for reliability, performance, and a seamless development experience.

HTML5

Semantic markup

CSS3

Gold & grey theme

JavaScript

Vanilla JS · Fetch

Python 3.9+

Backend language

Flask 2.3+

Web framework

Base64

Encoding algorithm

Vercel

Serverless deployment

REST API

JSON data exchange

06

API Reference

All API endpoints accept JSON requests and return JSON responses. Password authentication is required for all operations.

POST /api/encrypt

Encodes a plaintext message to Base64 format

✓ Secure
Request Body
{
  "message": "Hello World",
  "password": "abc@q1#*#"
}
● message (required) ● password (required)
Success Response (200)
{
  "success": true,
  "result": "SGVsbG8gV29ybGQ=",
  "message": "Encoding successful"
}
400 Bad Request
{"error": "Input password"} Missing password field
401 Unauthorized
{"error": "Invalid password"} Incorrect secret key

POST /api/decrypt

Decodes a Base64 string back to plaintext

✓ Secure
Request Body
{
  "message": "SGVsbG8gV29ybGQ=",
  "password": "abc@q1#*#"
}
● message (required) ● password (required)
Success Response (200)
{
  "success": true,
  "result": "Hello World",
  "message": "Decoding successful"
}
400 Bad Request
{"error": "Invalid base64 data"} Malformed Base64 input
401 Unauthorized
{"error": "Invalid password"} Incorrect secret key

Default Secret Key

The default password for demonstration is: abc@q1#*#

Store your secret key securely in environment variables for production