A web-based JSON configuration file editor that allows users to create, edit, view, and download JSON configuration files.
- Create new JSON configuration files
- Edit existing JSON configuration files
- View JSON file contents
- Download JSON files
- Delete JSON files
- Simple password-based authentication for access control
- Backend: Go (Gin framework)
- Frontend: HTML, JavaScript
- Database: SQLite for storing file metadata
- Storage: Local file system
- Ensure Go environment is installed
- Clone the project to your local machine
- Install dependencies:
go mod download
- Run the project:
go run main.go
- Access
http://localhost:8080
to start using
- Simple password authentication is implemented for accessing the homepage
- Add
?password=YOUR_PASSWORD
parameter to the URL for access- Example:
http://localhost:8080?password=your_password
- Example:
- Main features:
- Create new file: Click "New" button
- Edit file: Select file and click "Edit"
- View file: Select file and click "View"
- Download file: Select file and click "Download"
- Delete file: Select file and click "Delete"
GET /json-api/json
- Get list of all JSON filesGET /json-api/json/:filename
- Get content of specified JSON fileGET /json-api/json/:filename/download
- Download specified JSON filePOST /json-api/json/:filename
- Create new JSON filePUT /json-api/json/:filename
- Update specified JSON fileDELETE /json-api/json/:filename
- Delete specified JSON file
- Simple password-based authentication is implemented for basic access control
- It's recommended to change the default password in production environment
- All file operations have permission verification
- For enhanced security, consider implementing more robust authentication methods in production
- Ensure sufficient disk space for storing JSON files
- Regular backup of important configuration files is recommended
- Do not use default password in public network environments
- This is a simple implementation for demonstration purposes