This is a starter template for projects with a Python-based backend and a NextJS-based frontend. This makes some opinionated choices on tooling, but you are free to change them as you see fit. Specifically:
- NextJS is set up to use TypeScript and TailwindCSS.
pnpmis used to manage frontend dependencies. It's faster and storage-efficient than bothnpmandyarn.poetryis used to manage backend dependencies. It's a modern and fast dependency and environment manager for Python.
The project follows a typical src app-based NextJS setup, with an added Python API backend under src/api. Routing is managed by NextJS (see next.config.js), and the API is served under /api by default.
public/ # Static files (images, fonts, etc.)
src/ # Main source directory
|.... api # Python-based API code
|.... app # Frontend routes, page code, CSS
|.... components # Frontend components
-
Clone the template using
degit:pnpx degit tesselate-ai/nextjs-starter <project-name>
-
Update the information in
package.jsonandpyproject.tomlto match the new project's name.
# Install the runtimes and tooling
asdf install
# If there are any missing plugin errors, install with:
asdf plugin add <plugins># Install dependencies
pnpm installNote: Backend dependencies are installed automatically when running
pnpm install. To install backend dependencies manually, runpoetry install --sync
Run the project:
pnpm run devMake your own kind of magic. 🎩✨