Quick Start Guide for tortaCMS
Welcome to the quick start guide for tortaCMS, a powerful content management system built with Next.js 13 app router and designed to support multiple databases including MongoDB, MySQL, and PostgreSQL. This guide will walk you through the installation process and cover the basic requirements to get started with tortaCMS, which uses Prisma for database connections.
Prerequisites
Before you begin the installation process, please make sure you have the following prerequisites:
- Node.js and npm: tortaCMS is built on top of Next.js and Prisma, which require Node.js and npm to be installed on your machine. You can download and install them from nodejs.org.
- MongoDB, PostgreSQL or MySQL for your database connection.
Installation with Git Clone
To get started with TortaCMS, follow these steps:
- Clone the repository:
Open a terminal or command prompt and navigate to the directory where you want to install tortaCMS. Then, run the following command to clone the tortaCMS repository:
git clone https://github.com/FelBenini/torta-cms
- Navigate to the Project Directory:
Change into tortaCMS's project directory using the following command:
cd torta-cms
-
Choose a database branch:
TortaCMS supports multiple databases, and there are different branches in the repository for each supported database. Choose the appropriate branch based on the database you want to use:- For MongoDB: git checkout mongo
- For MySQL: git checkout mysql
- For PostgreSQL: git checkout postgres
-
Install the dependencies:
To install the dependencies, you can simply run:
npm install
- Setup your environment variables:
tortaCMS needs 3 environment variables to work properly, CONNECTION_STRING, NEXTAUTH_SECRET and NEXAUTH_URL. You should create a .env file on the root of the project that looks like this:
CONNECTION_STRING='postgresql://user:password@localhost:5432/mydb?schema=sample' #connection string for your database
NEXTAUTH_SECRET='asdfasdfdasfa0j324asdioahdAAsdfasfsaddfasofjadspo243432zafaASdgsfHDShgSGSFHgs' #this is the hash that will encrypt your jwt tokens
NEXTAUTH_URL='http://localhost:3000' #the url where tortaCMS will be running
- Build and run the project:
Run the following commands to build and run your application. Keep in mind that the build process will automatically migrate and push the schemas to your database:
npm run build
npm start
- Access tortaCMS and create your admin user:
Open your web browser and navigate to http://localhost:3000 to access the tortaCMS application, where you will see the register page for setting up your admin user, follow the instructions and you will be all set for start using tortaCMS.
Next Steps
Congratulations! You have successfully installed tortaCMS with support for the selected database and Prisma for database connections. From here, you can start customizing and building your content management system. You can explore the project structure, modify the templates, and create your own content.
Happy content managing with TortaCMS! 🍰📝