Skip to content

Quickstart for Directus / Next.js / Tailwind Css stack

License

Notifications You must be signed in to change notification settings

Calderis/Directus-Next-Starter

Repository files navigation


Directus / Next.js / Tailwind starter

An awesome README template to jumpstart your projects!
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Directus-Next-Starter

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.

(back to top)

Built With

(back to top)

Prerequisites

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.

Installation

  1. Clone the repository and install dependancies
git clone https://github.com/Calderis/Directus-Next-Starter.git
cd Directus-Next-Starter
yarn
  1. 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
  1. 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=
  1. 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
  1. 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

(back to top)

Usage

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

(back to top)

Roadmap

  • 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).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Calderis - [email protected]

Project Link: https://github.com/Calderis/Directus-Next-Starter Test it online: https://directus-next-starter.vercel.app/

(back to top)

Languages