Skip to content

Commit 2684b00

Browse files
authored
Merge pull request #5 from team-plain/p-7887-update-readme
Update readme
2 parents d061e56 + 15d4504 commit 2684b00

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
1+
# Plain headless portal
22

3-
## Getting Started
3+
This is a minimally styled example [Next.js](https://nextjs.org/) project demonstrating how you can use the Plain API to create a custom support portal. In the portal your customers can log in to:
44

5-
First, run the development server:
5+
- Raise new support requests
6+
- View requests raised by anyone in their tenant
67

7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
15-
```
8+
## Getting Started
169

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10+
In order to use this example you first need to have a workspace set up with [Plain](https://www.plain.com/) on at least the [Grow plan](https://www.plain.com/pricing).
1811

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
12+
Now you will need to create an API key for the support portal backend to authenticate with Plain.
2013

21-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
14+
- Log in to Plain and go to `Settings -> Machine users`
15+
- Click `Add machine user` and fill in the details
16+
- You should be taken to your machine user, now click `Add API key`
17+
- Copy the permissions from below and click 'Paste permissions'
18+
- Fill in the description and save the key
2219

23-
## Learn More
20+
```
21+
attachment:download,company:read,customer:read,customerGroup:read,customerGroupMembership:read,customerTenantMembership:read,email:read,label:read,labelType:read,note:read,roles:read,serviceLevelAgreement:read,tenant:read,tenant:search,thread:read,tier:read,tierMembership:read,timeline:read,user:read,workspace:read,threadField:read,threadFieldSchema:read,customer:create,customer:edit,thread:create,thread:edit
22+
```
2423

25-
To learn more about Next.js, take a look at the following resources:
24+
Once you have your key you can get started:
2625

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
26+
```bash
27+
npm install
28+
PLAIN_API_KEY=<your_key> npm run dev
29+
```
30+
31+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
2932

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
33+
## Screenshots
3134

32-
## Deploy on Vercel
35+
![View the list of requests](/screenshots/thread-list.png)
3336

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
37+
![See the details of a support request](/screenshots/thread-page.png)
3538

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
39+
![Create a new support request](/screenshots/new-request.png)

screenshots/new-request.png

38.5 KB
Loading

screenshots/thread-list.png

64.8 KB
Loading

screenshots/thread-page.png

75.3 KB
Loading

0 commit comments

Comments
 (0)