mirror of
https://github.com/Screenly/Anthias.git
synced 2025-12-23 22:38:05 -05:00
chore: create Cursor rules (#2273)
* chore: create Cursor rules * chore: have `.cursor` be ignored in essential GitHub workflow files
This commit is contained in:
33
.cursor/rules/general.mdc
Normal file
33
.cursor/rules/general.mdc
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
# General
|
||||
|
||||
- Anthias uses Django as the web framework
|
||||
|
||||
# Project Structure
|
||||
|
||||
- [anthias_app](mdc:anthias_app) and [anthias_django](mdc:anthias_django) is where the Django source code lives.
|
||||
- Django HTML templates live in the [templates](mdc:templates) directory.
|
||||
- The [static](mdc:static) directory contains static files like HTML, CSS, and JavaScript
|
||||
files used for the web interface.
|
||||
- The source code was written in CoffeeScript, which gets transpiled to JavaScript.
|
||||
- The [webpack.common.js](mdc:webpack.common.js), [webpack.dev.js](mdc:webpack.dev.js), and [webpack.prod.js](mdc:webpack.prod.js) are configuration files
|
||||
necessary for transpiling CoffeeScript and SCSS source files to JavaScript and CSS files,
|
||||
respectively.
|
||||
- This project uses Docker for containerization.
|
||||
- [docker-compose.yml.tmpl](mdc:docker-compose.yml.tmpl) is used for instances installed on Raspberry Pi and x86 devices
|
||||
that runs Raspberry Pi OS Lite or Debian.
|
||||
- [docker-compose.dev.yml](mdc:docker-compose.dev.yml) is used for Anthias in development mode (e.g., in a laptop or
|
||||
personal computer).
|
||||
- [docker-compose.balena.yml.tmpl](mdc:docker-compose.balena.yml.tmpl) is used for instances installed on devices that runs
|
||||
balenaOS.
|
||||
- The [docker](mdc:docker) directory contains all the necessary Dockerfiles needed by Anthias.
|
||||
- The [requirements](mdc:requirements) directory contains all the requirements files required by Anthias
|
||||
- [webview](mdc:webview) contains C++ (Qt) source code necessary for the WebView, which is
|
||||
a custom-built web browser that makes display of assets (images, videos, or web pages) in
|
||||
a connected display (like a TV) possible.
|
||||
- [viewer](mdc:viewer) contains the Python source files used by the viewer service, which is
|
||||
responsible for driving a screen to display content.
|
||||
10
.cursor/rules/javascript.mdc
Normal file
10
.cursor/rules/javascript.mdc
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
- CoffeeScript is used for front-end code, which gets transpiled to JavaScript.
|
||||
- See [anthias.coffee](mdc:static/js/anthias.coffee) and [settings.coffee](mdc:static/js/settings.coffee) for details.
|
||||
- Backbone.js is used as the front-end framework.
|
||||
- CoffeeScript and Backbone.js will be deprecated in favor of modern frameworks
|
||||
that are more stable and still maintained.
|
||||
10
.cursor/rules/python.mdc
Normal file
10
.cursor/rules/python.mdc
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
- Most of Anthias' source code is written in Python.
|
||||
- Django is used as the web framework.
|
||||
- [Ruff](mdc:https:/github.com/astral-sh/ruff) is used for linting and formatting Python files.
|
||||
- See [pyproject.toml](mdc:pyproject.toml) for linting and formatting rules.
|
||||
- Use [type hints](mdc:https:/docs.python.org/3/library/typing.html) when updating and generating Python files.
|
||||
10
.cursor/rules/qt.mdc
Normal file
10
.cursor/rules/qt.mdc
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description:
|
||||
globs:
|
||||
alwaysApply: true
|
||||
---
|
||||
- The [webview](mdc:webview) consists of purely C++ files.
|
||||
- The WebView binary used for Raspberry Pi (1 to 4) devices uses Qt 5.
|
||||
- The WebView binary used for Raspberry Pi 5 and x86 devices uses Qt 6.
|
||||
- Use C++ macros when updating or generating code so that changes support
|
||||
both Qt 5 and Qt 6 code.
|
||||
1
.github/workflows/docker-build.yaml
vendored
1
.github/workflows/docker-build.yaml
vendored
@@ -21,6 +21,7 @@ on:
|
||||
- '!bin/start_development_server.sh'
|
||||
- '!tests/**'
|
||||
- '!docker/Dockerfile.dev'
|
||||
- '!.cursor/**'
|
||||
|
||||
jobs:
|
||||
run-tests:
|
||||
|
||||
2
.github/workflows/docker-test.yaml
vendored
2
.github/workflows/docker-test.yaml
vendored
@@ -13,6 +13,7 @@ on:
|
||||
- '!.github/workflows/build-webview.yaml'
|
||||
- '!.github/workflows/build-balena-disk-image.yaml'
|
||||
- '!docs/**'
|
||||
- '!.cursor/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -24,6 +25,7 @@ on:
|
||||
- '!.github/workflows/build-webview.yaml'
|
||||
- '!.github/workflows/build-balena-disk-image.yaml'
|
||||
- '!docs/**'
|
||||
- '!.cursor/**'
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
|
||||
@@ -18,6 +18,7 @@ on:
|
||||
- '!bin/install.sh'
|
||||
- '!bin/upgrade_containers.sh'
|
||||
- '!tests/**'
|
||||
- '!.cursor/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -34,6 +35,7 @@ on:
|
||||
- '!bin/install.sh'
|
||||
- '!bin/upgrade_containers.sh'
|
||||
- '!tests/**'
|
||||
- '!.cursor/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
release:
|
||||
|
||||
Reference in New Issue
Block a user