Skip to content

This repository contains the old source code from Sanction PDF's application. The project utilizes a combination of Node.js, EJS templates, and custom styles to generate a dynamic and visually appealing report interface.

License

Notifications You must be signed in to change notification settings

BarcodeBimbo/Sanction-PDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Server

Sanction's PDF Server POC

This repository contains the old source code from Sanction PDF's application. The project utilizes a combination of Node.js, EJS templates, and custom styles to generate a dynamic and visually appealing report interface.


Features

  • Responsive UI: Adaptive grid layout and modern styling for a seamless user experience.
  • Dynamic Content Rendering: Data-driven rendering using EJS templates.
  • Real-time Updates: Displays the current date dynamically with JavaScript.
  • Organized Components:
    • Email display with clickable links.
    • Detailed sections for comprehensive reports, social security, addresses, relatives, and more.

File Structure

  • index.js: Main server-side script to manage data and rendering logic.
  • index.ejs: Template file with embedded EJS for dynamic content rendering.
  • Styles: Inline CSS within index.ejs for easy customization.

Technologies Used

  • Node.js: Backend framework for server-side operations.
  • EJS: Templating engine for rendering dynamic HTML.
  • HTML5/CSS3: Markup and styles for user interface.
  • JavaScript: Client-side scripts for real-time updates.

Setup

  1. Clone this repository:

    git clone https://github.com/BarcodeBimbo/Sanction-PDF.git
    cd Sanction-PDF
  2. Install dependencies:

    npm install
  3. Start the server:

    npm start
  4. Open your browser and navigate to:

    http://localhost:3000
    

How It Works

  • Dynamic Rendering: Data variables (e.g., data.socialSecurity, data.addresses) populate various sections of the report dynamically.
  • Real-Time Clock: JavaScript updates the date in the header every second.

Python Example

import requests

data = {
    "emails": [
        
    ],
    "driverLicense": {
        "type": "",
        "name": "",
        "idNumber": "",
        "state": "",
        "issued": "",
        "expires": ""
    },
    "socialSecurity": {
        "name": "",
        "ssn": "",
        "ssnState": "",
        "ssnYears": "",
        "dob": ""
    },
    "addresses": [

    ],
    "otherNumbers": [
        {"phoneNumber": "", "carrier": ""},
        {"phoneNumber": "", "carrier": ""}
    ],
    "relatives": [

    ],
    "liens": 0,
    "age": 0,
    "bankruptcy": 0,
    "data": "MM/D/YYYY"
}

# Send the POST request to the server
response = requests.post('http://localhost:3000/create-pdf', json=data)

# Check the response status code
if response.ok:
    filename = response.json()["Filename"]
    print(f'PDF Was Saved As {filename}')
else:
    print(f'PDF ERROR LOG - \nStatus code: {response.status_code}\nResponse: {response.text}')

Customization

Updating Styles

Edit the inline <style> section in index.ejs to modify the styles.

Adding Features

Extend the EJS template with additional sections or modify existing ones by referencing data variables.


Screenshots

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This repository contains the old source code from Sanction PDF's application. The project utilizes a combination of Node.js, EJS templates, and custom styles to generate a dynamic and visually appealing report interface.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published