notchris / payload-vue-starter

An example website with user login / registration using PayloadCMS and Vue3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PayloadCMS + Vue3

This example application shows how to use PayloadCMS to implement user login / registration with a custom frontend (using Vue3).

This project uses:

TODO

  • Add page for email verification (New user email verification is not enabled in this project)
  • Add composition API examples (currently uses Options API)

Installation

Run install in both the client and payload project folders

Client:

npm install

Payload:

npm install --save --legacy-peer-deps payload.

Configure

Client:

The client sets a Vue3 global property apiRoot in the src/main.ts entry file. Update this variable to be your Payload URL.

Payload:

You will want to follow the setup instructions for PayloadCMS (Setting your mongoDB URL, configuring CORS, etc...)

There is also an additional env var that you should set (used for a custom reset password URL). PAYLOAD_PUBLIC_SITEURL=http://example.com

Run

You can run:

npm run dev

in both the client and payload project folders, however - if you use VSCode, the launch tasks for running both are included.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

An example website with user login / registration using PayloadCMS and Vue3.


Languages

Language:Vue 77.8%Language:TypeScript 18.3%Language:Dockerfile 1.4%Language:HTML 1.1%Language:JavaScript 1.0%Language:CSS 0.3%