Live Editing is assembled but not working at the moment
Clone this repo and install the dependencies
git clone https://github.com/ferlarag/developer-blog.git
cd your-repo
npm install
npm run dev
npm run dev
This command will start the development server for both the Sanity Studio (localhost:3333) and NextJS app (localhost:3000)
You can deploy the NextJS app on vercel. If you don't plan on collaborating with others using the Sanity Studio, there's no need to deploy it and you'll probably be fine making changes locally.
If you want others to access the Studio, then you'll need to deploy it.
This monorepo is using turbo and follows the following structure:
apps/cms
: a Sanity Studio appapps/portfolio
: a Next.js apppackages/@repo/ui
: a stub React component library shared by bothweb
anddocs
applicationspackages/eslint-config
:eslint
configurations (includespackages/eslint-config-next
andeslint-config-prettier
)packages/typescript-config
:tsconfig.json
s used throughout the monorepo
Each package/app is 100% TypeScript.
- NextJS
- Sanity
- Typescript
- TailwindCSS
- Shadcn
There's two things you are going to change:
- Schema: the schemas are located in
apps/cms/schemas
. When you add/modify the shcema, you'll have to run thenpm run schema
(make sure you run it in theapp/cms
directory). This will grab the all the files that contain a Sanity schema object and it will generate a json file (it will be useful later for generating the types!). - Queries: the queries are located in the
app/portfolio/src/sanity/lib/queries.ts
file. Every time you add/modify a query to thequeries.ts
file, you'll need to run thenpm run generate
command (make sure you are running this command in theapps/portfolio
directory).
This project uses tailwindcss
, @portabletext/react
, react-refractor
.
This template is made with developers in mind. Sanity Studio is configured to used their @sanity/code-input
plugin and on the Front-end the project uses @portabletext/react
to render the Portable Text content. @portabletext/react
uses react-refractor
to stylize the code in the blog (you can change the style and use a theme from prism or other community themes for prism)
Everything else is pretty standard. Basic knowlege of TailwindCSS and React will be enough to customize the Front-end.
Coming soon!
This project followed the official documentation of each product