|
2 | 2 |
|
3 | 3 | **Publisher Command Center** is a web-based application designed to help publishers manage and track their content. |
4 | 4 |
|
5 | | -## Features |
| 5 | +## Setup |
6 | 6 |
|
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. |
12 | 8 |
|
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. |
14 | 12 |
|
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. |
16 | 15 |
|
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