Skip to content

Commit 0c686ab

Browse files
authored
Publisher Command Center: Move developer notes to CONTRIBUTING (#141)
1 parent fa66b79 commit 0c686ab

File tree

2 files changed

+117
-104
lines changed

2 files changed

+117
-104
lines changed
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Contributing to Publisher Command Center
2+
3+
## Uses
4+
5+
- **Mithril.js** for lightweight and efficient UI rendering
6+
- **Bootstrap** for responsive and consistent styling
7+
- **FontAwesome** for scalable vector icons
8+
- **Vite** for a fast development build system
9+
- **FastAPI** as the backend framework
10+
11+
## Getting Started
12+
13+
### Prerequisites
14+
15+
Ensure you have the following installed:
16+
17+
- [Node.js](https://nodejs.org/) (for frontend development)
18+
- [Python](https://www.python.org/) (for backend development)
19+
- [uv](https://github.com/astral-sh/uv) (for running backend server)
20+
21+
### Installation
22+
23+
Clone the repository and install dependencies:
24+
25+
```sh
26+
npm install
27+
uv sync
28+
```
29+
30+
### Running the Development Server
31+
32+
Start the frontend development server:
33+
34+
```sh
35+
npm run preview
36+
```
37+
38+
Start the backend development server:
39+
40+
```sh
41+
npm run server
42+
```
43+
44+
Start the watcher to enable continuous rebuilds of the frontend:
45+
46+
```sh
47+
npm run watch
48+
```
49+
50+
51+
### Building for Production
52+
53+
To build the frontend for production:
54+
55+
```sh
56+
npm run build
57+
```
58+
59+
### Deploying to Connect
60+
61+
When deploying, include `app.py`, `requirements.txt`, and the contents of the `dist` directory created by `npm run build`.
62+
63+
### Publishing on Connect
64+
65+
This extension utilizes the [Connect API OAuth Integration](https://docs.posit.co/connect/admin/integrations/oauth-integrations/connect/index.html#create-connect-api-integration-in-posit-connect).
66+
67+
After deploying the extension create a Connect API Viewer role integration, if
68+
one doesn't already exist on the server, and select it as a integration.
69+
70+
## Technologies Used
71+
72+
### [Mithril.js](https://mithril.js.org/)
73+
74+
Mithril.js is a modern client-side JavaScript framework that focuses on simplicity and performance. It is lightweight (~10kb gzipped) and offers a virtual DOM implementation for efficient rendering.
75+
76+
### [Bootstrap](https://getbootstrap.com/)
77+
78+
Bootstrap is a popular CSS framework that helps create responsive and mobile-first designs with prebuilt components and utilities.
79+
80+
### [FontAwesome](https://fontawesome.com/)
81+
82+
FontAwesome provides scalable vector icons and social logos that can be used in web applications.
83+
84+
### [Date-fns](https://date-fns.org/)
85+
86+
Date-fns is a modern JavaScript date utility library that provides comprehensive, yet simple-to-use functions for date manipulation.
87+
88+
### [Filesize.js](https://filesizejs.com/)
89+
90+
Filesize.js is a small utility for formatting file sizes in human-readable formats.
91+
92+
### [Vite](https://vitejs.dev/)
93+
94+
Vite is a next-generation frontend tooling system that enables fast build times and instant development server start-up.
95+
96+
### [SASS](https://sass-lang.com/)
97+
98+
SASS (Syntactically Awesome Stylesheets) is a CSS preprocessor that extends CSS with features like variables, nested rules, and mixins.
99+
100+
### [FastAPI](https://fastapi.tiangolo.com/)
101+
102+
FastAPI is a modern web framework for building APIs with Python 3.7+ that provides automatic OpenAPI and JSON Schema documentation.
103+
104+
## Code Formatting
105+
106+
This project uses **Prettier** for consistent code formatting. Run the following command to format your code:
107+
108+
```sh
109+
npx prettier --write .
110+
```

extensions/publisher-command-center/README.md

Lines changed: 7 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,111 +2,14 @@
22

33
**Publisher Command Center** is a web-based application designed to help publishers manage and track their content.
44

5-
## Features
5+
## Setup
66

7-
- **Mithril.js** for lightweight and efficient UI rendering
8-
- **Bootstrap** for responsive and consistent styling
9-
- **FontAwesome** for scalable vector icons
10-
- **Vite** for a fast development build system
11-
- **FastAPI** as the backend framework
7+
After deploying **Publisher Command Center**, you'll need to add a Visitor API Key integration.
128

13-
## Getting Started
9+
In Posit Connect go to the app's control panel on the right of the screen, in
10+
the Access tab, click **"Add integration"**, then select a **Visitor API Key**
11+
integration.
1412

15-
### Prerequisites
13+
If you don't see one in the list, an administrator must enable this feature on your Connect server.
14+
See the [Admin Guide](https://docs.posit.co/connect/admin/integrations/oauth-integrations/connect/) for setup instructions.
1615

17-
Ensure you have the following installed:
18-
19-
- [Node.js](https://nodejs.org/) (for frontend development)
20-
- [Python](https://www.python.org/) (for backend development)
21-
- [uv](https://github.com/astral-sh/uv) (for running backend server)
22-
23-
### Installation
24-
25-
Clone the repository and install dependencies:
26-
27-
```sh
28-
npm install
29-
uv sync
30-
```
31-
32-
### Running the Development Server
33-
34-
Start the frontend development server:
35-
36-
```sh
37-
npm run preview
38-
```
39-
40-
Start the backend development server:
41-
42-
```sh
43-
npm run server
44-
```
45-
46-
Start the watcher to enable continuous rebuilds of the frontend:
47-
48-
```sh
49-
npm run watch
50-
```
51-
52-
53-
### Building for Production
54-
55-
To build the frontend for production:
56-
57-
```sh
58-
npm run build
59-
```
60-
61-
### Deploying to Connect
62-
63-
When deploying, include `app.py`, `requirements.txt`, and the contents of the `dist` directory created by `npm run build`.
64-
65-
### Publishing on Connect
66-
67-
This extension utilizes the [Connect API OAuth Integration](https://docs.posit.co/connect/admin/integrations/oauth-integrations/connect/index.html#create-connect-api-integration-in-posit-connect).
68-
69-
After deploying the extension create a Connect API Viewer role integration, if
70-
one doesn't already exist on the server, and select it as a integration.
71-
72-
## Technologies Used
73-
74-
### [Mithril.js](https://mithril.js.org/)
75-
76-
Mithril.js is a modern client-side JavaScript framework that focuses on simplicity and performance. It is lightweight (~10kb gzipped) and offers a virtual DOM implementation for efficient rendering.
77-
78-
### [Bootstrap](https://getbootstrap.com/)
79-
80-
Bootstrap is a popular CSS framework that helps create responsive and mobile-first designs with prebuilt components and utilities.
81-
82-
### [FontAwesome](https://fontawesome.com/)
83-
84-
FontAwesome provides scalable vector icons and social logos that can be used in web applications.
85-
86-
### [Date-fns](https://date-fns.org/)
87-
88-
Date-fns is a modern JavaScript date utility library that provides comprehensive, yet simple-to-use functions for date manipulation.
89-
90-
### [Filesize.js](https://filesizejs.com/)
91-
92-
Filesize.js is a small utility for formatting file sizes in human-readable formats.
93-
94-
### [Vite](https://vitejs.dev/)
95-
96-
Vite is a next-generation frontend tooling system that enables fast build times and instant development server start-up.
97-
98-
### [SASS](https://sass-lang.com/)
99-
100-
SASS (Syntactically Awesome Stylesheets) is a CSS preprocessor that extends CSS with features like variables, nested rules, and mixins.
101-
102-
### [FastAPI](https://fastapi.tiangolo.com/)
103-
104-
FastAPI is a modern web framework for building APIs with Python 3.7+ that provides automatic OpenAPI and JSON Schema documentation.
105-
106-
## Code Formatting
107-
108-
This project uses **Prettier** for consistent code formatting. Run the following command to format your code:
109-
110-
```sh
111-
npx prettier --write .
112-
```

0 commit comments

Comments
 (0)