API Documentation for Selfmade Tech API

This API provides a comprehensive suite of endpoints for managing users, handling file uploads, performing image operations, and facilitating dynamic content rendering. The endpoints are modularized into distinct Flask Blueprints to ensure a clean and organized structure.

Base URL

https://jawa.selfmade.technology

Endpoints

POST /api/v1/register

Registers a new user with the platform.

POST /api/v1/auth

Authenticates the user, starting a new session.

GET /api/v1/deauth

Logs out the authenticated user, terminating their session.

GET /files/uploader

Displays the file upload form.

POST /files/uploader

Processes the file upload and saves metadata to the database.

GET /files/open/<filename>

Retrieves the specified image file from the server.

POST /files/delete

Deletes the specified image file from the database.

POST /files/like

Likes or unlikes the specified image file.

GET /files/getallimages

Retrieves all images along with their metadata.

POST /files/chatUpdate

Updates the chat with a new message.

GET /files/fetchChat

Fetches all chat messages from the server.

POST /api/v1/lincmds

Executes a specified Linux command on the server.

GET /api/v1/cpuACTusr

Provides information on current CPU usage and the number of active users.

GET /mobile/upload

Displays the upload form for mobile number files.

POST /mobile/upload

Processes the uploaded file, segregating mobile numbers.

GET /mobile/download

Displays the download page for segregated mobile numbers.

GET /mobile/download/<filename>

Allows the user to download the specified file.

GET /mobile/compare

Compares two uploaded files and removes duplicates from the second file.

POST /mobile/count-numbers

Counts the total number of mobile numbers in the uploaded file.

GET /

Displays the home page of the API.

GET /resume

Displays the resume page.

GET /projects

Displays the projects page.

GET /contact

Displays the contact page.

GET /login

Displays the login page for users.

GET /secret

Displays the secret page.

GET /otpage

Displays the OTP verification page.

GET /register

Displays the registration page.

GET /draw

Displays the drawing page.

GET /verify_drawing

Redirects to the CCTV verification page.

GET /cctv

Displays the CCTV page.

GET /dashboard

Displays the user dashboard with data fetched from the API.

GET /chatbox

Displays the chatbox interface with live chat data.

Error Handling

401 Unauthorized: Returned when authentication is required but not provided.

404 Not Found: Returned when the requested resource does not exist.

500 Internal Server Error: Returned when there is an error on the server side.

Conclusion

This API provides a comprehensive set of functionalities for user management, file operations, and system management, making it suitable for a wide variety of applications. Ensure that all endpoints requiring authentication are properly secured and validate all inputs to maintain the integrity of the system.