README improvements

This commit is contained in:
Ian Renton
2025-10-04 12:44:29 +01:00
parent f22ebaf9a4
commit f75f79a108

View File

@@ -137,6 +137,35 @@ Various approaches exist to writing your own client, but in general:
* Refer to the provided HTML/JS interface for a reference * Refer to the provided HTML/JS interface for a reference
* Let me know if you get stuck, I'm happy to help! * Let me know if you get stuck, I'm happy to help!
### Structure of the source code
To navigate your way around the source code, this list may help.
*Python back-end code*
* `/core` - Core classes and scripts
* `/data` - Data storage classes
* `/providers` - Classes providing data by accessing the APIs of other services
* `/server` - Classes for running Spothole's own web server
*Templates*
* `/views` - Templates used for constructing Spothole's user-targeted HTML pages
*HTML/JS/CSS front-end code*
* `/webassets` - Root for static files served by the web server
* `/webassets/apidocs` - Contains the OpenAPI spec (`openapi.yml`)
* `/webassets/css` - CSS files used by the web front-end
* `/webassets/fa` - a copy of the FontAwesome library
* `/webassets/img` - image files used by the web front-end
* `/webassets/js` - JavaScript used by the web front-end
*Miscellaneous*
* `/` - Main script (`spothole.py`), pip `requirements.txt`, config, README, etc.
* `/images` - Image sources
### Extending the server ### Extending the server
Spothole is designed to be easily extensible. If you want to write your own provider, simply add a module to the `providers` package containing your class. (Currently, in order to be loaded correctly, the module (file) name should be the same as the class name, but lower case.) Spothole is designed to be easily extensible. If you want to write your own provider, simply add a module to the `providers` package containing your class. (Currently, in order to be loaded correctly, the module (file) name should be the same as the class name, but lower case.)