Walk through
Following is a walkthrough of the ProWrite codebase:
-
The
/app
folder contains the blog, article, authors, and contact pages. It also includes the error, loading, and not-found pages, along withglobal.css
,favicon.ico
,sitemap.ts
, and asyntax.css
file that highlights code. -
The
/components
folder contains subfolders with the components for each page and other related components. -
The
/content
folder contains the local content (articles and authors). -
The
/contexts
folder contains theAlert
context used to trigger alerts from anywhere in the app. -
The
/lib
folder contains SEO metadata and utility functions used in the client environment. -
The
/public
folder contains subfolders with related static assets, such as images. -
The
/resources
folder contains resources such as Contentful config. -
The
/server
folder contains the following four subfolders:- The
/actions
folder contains files with React Server Actions. - The
/config
folder contains the Contentful configuration for interacting with the CMS. - The
/data
folder contains subfolders and files with functions to fetch data. - The
/lib
folder contains the error handler and utility functions used in the server environment.
- The
-
The
.env.example
file contains the environment variables used in the template. -
The
types.ts
file contains the type definitions used in the app.
Lastly, there are a few configuration files.