An awesome README template to jumpstart your projects!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
I do love Directus. Here is a project to kickstart a website while using Directus as Backend service. It uses the auth api, the settings as well to get the Project name, the Project logo, the main site color, and so on. There is already a protected page example to help you fasten your development.
If you think about a feature or two, please help yourself and submit a pull request :) ! Just keep it simple, I do not plan on making this repo a full war-ready factory.
I hope it'll help you kickstart your next project.
This project is only about the Next.js/React side of the deal. You therefore need to setup a Directus project on your own.
Start a Directus
You will require a Directus to mount your database. By default it does run on the port 8055.
You can start it through yarn setup:directus
or follow the Directus quickstart.
- Quick start: Getting started
- Clone the repository and install dependancies
git clone https://github.com/Calderis/Directus-Next-Starter.git
cd Directus-Next-Starter
yarn
- Configure your local environment
Copy the .env.local.example file in this directory to .env.local (which will be ignored by Git):
cp .env.local.example .env.local
- Setup Directus Env
You should setup Directus env with following env variables :
PASSWORD_RESET_URL_ALLOW_LIST="http://localhost:3000/login/password-reset"
EMAIL_FROM=
EMAIL_SMTP_HOST=
EMAIL_SMTP_PORT=
EMAIL_SMTP_USER=
EMAIL_SMTP_PASSWORD=
- Start the application
To run your site locally, use:
yarn dev
To run it it production mode, use:
yarn build
yarn start
And run your directus in an other terminal
npx directus start
- Change Directus Roles & Permissions from settings
You should allow the following for Public :
Collection | Permission | Level |
---|---|---|
directus_settings | read | full |
directus_users | create | full |
directus_users | read | email, avatar, title, description, id, tags |
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
For more examples, please refer to the Documentation
- Authentification ready
- User settings page form
- Fetch Directus Settings (require to unlock view permission into Public directus_settings)
- Contact form
- Policy page
- Privacy page
- Search Page
- Footer
- Update profile picture
- Reload session on user settings change
- RGPD
- Clear all user data feature
- Get All user data
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Calderis - [email protected]
Project Link: https://github.com/Calderis/Directus-Next-Starter Test it online: https://directus-next-starter.vercel.app/