Skip to content

Creating a Project

Using the SDK is the easiest method for getting started with a new project.

Simply run the init command and you'll have a FastAPI [] backend and Next.js [] frontend in seconds! No extra parameters needed.

1
zentra init

You'll find two new shiny directories in your project folder that will look similar to this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
<project_name>/
├── backend/
│   ├── app/
│   │   └── ...
│   ├── ...
│   ├── .env
│   ├── alembic.ini
│   ├── pyproject.toml
│   └── ...
├── frontend/
│   ├── public/
│   │   └── ...
│   ├── src/
│   │   └── ...
│   ├── .env.local
│   ├── package.json
│   ├── tailwind.config.js
│   └── ...
├── env/
│   └── ...
├── .gitignore
└── README.md

Backend Directory

Did you know?

We built the backend using the zentra-api package!

1
zentra-api init backend

Pretty cool right?! 🤓

The backend directory is home to our FastAPI [] files and is fully managed by the zentra-api package.

You can read more about it in the API First Steps tutorial.

Frontend Directory

The frontend directory contains our Next.js [] files and is unique to the SDK package.

We'll read more about this in the next chapter, but for now, we should probably finish setting up the frontend!😅

Starting The Frontend

  1. Firstly, access the frontend directory:

    1
    cd frontend
    
  2. Next, install the Node packages:

    1
    npm install
    
  3. Test it works by running the development environment:

    1
    npm run dev
    
  4. Navigate to http://localhost:3000 and you should see the following:

Frontend example

If so, you are good to go! 🚀