My new website/CMS (made in Next.js) https://cpluspatch.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Jesse Wierzbinski 8c4df4c5b7
remove some text
1 month ago
components remove some text 1 month ago
config Add new progress bars 3 months ago
pages correct outdated info 1 month ago
public Remove dead code 1 month ago
styles Fix UI glitch 3 months ago
supabase IT WORKSSS 4 months ago
types Add more editor stuff 2 months ago
utils fix posts not being sorted by date right 3 months ago
.env.example Add .env.example 3 months ago
.eslintrc.json Initial commit from Create Next App 9 months ago
.gitignore fix posts not being sorted by date right 3 months ago
.prettierrc Update README.txt, add Prettier config 3 months ago
COPYING Add license 5 months ago
README.md Remove dead code 1 month ago
next.config.js Remove Preact (caused bugs) 4 months ago
package.json Major improvements to sidebar in edit 3 months ago
postcss.config.js Re-implemented landing page from my website 9 months ago
tailwind.config.js Add socials beta 4 months ago
tsconfig.json Remove Preact (caused bugs) 4 months ago
yarn.lock Fix UI glitch 3 months ago

README.md

⚠️ Please don't host this code on GitHub! More information

💻 CPlusPatch Web

A work-in-progress personal website, portfolio and CMS built with Next.js and TypeScript





screenshot screenshot screenshot screenshot screenshot

Key Features

  • Lightning-fast, responsive and secure
  • Server-side rendering allowing for smaller JS payloads and better website metrics
  • Optimized as much as possible
  • Full user authentication with password resets, profile editing, avatar upload, user roles (such as admin)
  • Admin dashboard and user manager
  • Full CRUD with Markdown (on a hidden page)
  • < 200 kB initial JS payload for every page (I am looking onto reducing this)

Planned features

  • Full user auth Done!
  • User roles Done!
  • Full Markdown CRUD Done!
  • User profiles Done!
  • Page theming - Being worked on right now

How to access the CMS?

Simply click the "CMS" link on site navbar or visit /blog in a web browser

Getting your own version setup

Downloading and running

Install Node.js (version 18 LTS is recommended for this project) and Git, then clone the repository:

# Clone this repository
$ git clone https://codeberg.org/CPlusPatch/cpluspatch-cms-next

# Go into the repository
$ cd cpluspatch-cms-next

# Install dependencies
$ yarn

# Run the app
$ yarn dev

Database setup

  1. Create a new project at https://supabase.com
  2. Open the project's Table Editor and create two new tables named accounts and user. Set up these columns:
export interface Accounts {
  	id: number
	name: string | null
	username: string | null
	avatar: string | null
	// This should be linked to the "id" column of the "users"
	// table (change schema to "auth" to see it)
	user_id: string | null // ⬅ linked to auth:users:id
	role: string | null
	id: number
    about_me: string | null
}

export interface Posts {
	id: number
	created_at: string | null
	content: string | null
	author: number | null
	title: string | null
	description: string | null
	slug: string | null
	visibility: string | null
	banner: string | null
}

Environment variables

Copy .env.example to .env:

cp .env.example .env

Setup Supabase with the previously mentioned database schema and then fill in your API keys (anon and master) inside the .env file. Then, create an account at https://imagekit.io and fill in your endpoint and API keys (both public and private). Don't forget to change NEXT_PUBLIC_HOSTNAME to your app's public URL! (http://localhost:3000 for a dev server)

Development

Generating types

Install the Supabase CLI and run the following command to generate up-to-date types:

supabase gen types typescript --project-id "$PROJECT_ID" --schema public > types/supabase.ts

NOTE: Please check types/types.d.ts

Credits

This software uses the following open source libraries, and more! Check out package.json for a list of all the librarues

License

Please see COPYING for more details. This software is licensed under GNU GPLv3