This web app allows users to input an ASCII file structure and generate a downloadable zip file containing the declared files and directories. Users can also specify file contents using JSON.
- Parse ASCII file structure
- Generate a zip file with the declared files and directories
- Insert file contents from JSON input
- Containerized using Docker
- Deployed on AWS ECS
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install dependencies:
npm install
-
Start the server:
node server.js
-
Open
index.htmlin your browser.
-
Build the Docker image:
docker build -t ascii-file-structure . -
Run the Docker container:
docker run -p 3000:3000 ascii-file-structure
To validate the application, use the /test endpoint which uses the test_input.json file:
- Run the test script:
node test_script.js
This script will call the /test endpoint, generate the zip file based on the test input, and download it as file_structure_test.zip.
- Create an ECR repository and push the Docker image.
- Create an ECS cluster and define a task using the Docker image.
- Run the task on ECS and ensure the necessary IAM roles and security groups are set up.
{
"structure": {
"src": {
"main.ts": "console.log('Hello, world!');",
"modules": {
"chatInterface.ts": "// Chat Interface Module",
"conversationManager.ts": "// Conversation Manager Module",
"messageLogger.ts": "// Message Logger Module",
"uiElements.ts": "// UI Elements Module",
"utils.ts": "// Utility Functions Module"
},
"styles": {
"styles.css": "body { background-color: #f0f0f0; }"
}
}
}
}