https://github.com/viniciuscestarii/vinicius-blog
📚 My blog and CMS
https://github.com/viniciuscestarii/vinicius-blog
blog cms nextjs14 redis rsc ssg tailwindcss
Last synced: about 2 months ago
JSON representation
📚 My blog and CMS
- Host: GitHub
- URL: https://github.com/viniciuscestarii/vinicius-blog
- Owner: ViniciusCestarii
- License: mit
- Created: 2024-09-15T20:29:18.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-06T17:50:00.000Z (about 2 months ago)
- Last Synced: 2025-03-06T18:23:23.794Z (about 2 months ago)
- Topics: blog, cms, nextjs14, redis, rsc, ssg, tailwindcss
- Language: TypeScript
- Homepage: https://blog.viniciuscestari.dev
- Size: 1.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vinicius Blog and CMS
This project is my own blog and a a custom-built CMS and blog platform created using Next.js, MDX, React, and other modern web technologies. It allows for easy management of blog posts, including creating, editing, and deleting posts, as well as viewing and liking posts.
## Features
- **Next.js**: Utilizes Next.js for server-side rendering (SSR) and static site generation (SSG) for fast load times and SEO optimization.
- **MDX**: Supports writing blog posts in Markdown with embedded React components.
- **Tailwind CSS**: Uses Tailwind CSS for utility-first styling.
- **Redis**: Manages post views and likes with Redis for fast reads and writes.
- **Admin Access**: Provides an admin interface for managing posts.
- **Authentication**: Includes authentication for admin access using JWT.
- **Responsive Design**: Ensures a seamless experience across different devices.## Getting Started
### Prerequisites
- Node.js or Bun
- npm or yarn or bun
- Redis server (You can create a free tier instance using [Redis Cloud](https://redis.io/try-free/))### Installation
1. Clone the repository:
- `git clone https://github.com/ViniciusCestarii/vinicius-blog.git`
3. Install dependencies:
- `npm i`
- `yarn i`
- `bun i`
5. Set up environment variables:
- Copy `.env.example` to `.env.local` and fill in the required values.### Start the development server:
- `npm run dev`
- `yarn dev`
- `bun dev`Open `http://localhost:3000` with your browser to see the result.
## Usage
### Creating a Post
1. Log in as an admin on `/login` page with the credentials on `.env`.
2. Use the "Create new post" button to open the post creation dialog.
3. Fill in the post name and submit.### Editing a Post
1. Log in as an admin.
2. Navigate to the post you want to edit.
3. Click the "Edit post" button to open the edit dialog.
4. Make your changes and submit.### Deleting a Post
1. Log in as an admin.
2. Navigate to the post you want to delete.
3. Click the "Delete post" button.
4. Write the post title and click the "Delete post" button.## Build
1. Build the project:
- `npm run build`
- `yarn build`
- `bun run build`2. Move static files to the `.next/standalone/.next` directory ([see doc](https://nextjs.org/docs/app/api-reference/config/next-config-js/output#automatically-copying-traced-files)):
- `cp -r .next/static .next/standalone/.next/`3. Start the production server:
- `node .next/standalone/server.js`
- `bun .next/standalone/server.js`## Deployment
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.
## Docker
You can also run the project using Docker. To do so, follow these steps:
1. Build the Docker image:
- `docker build -t vinicius-blog .`
2. Run the Docker container:
- `docker run -p 3000:3000 vinicius-blog`### Running with Docker Compose
Alternatively, you can use Docker Compose to run the project with Redis. To do so, follow these steps:
1. Build the Docker image:
- `docker-compose build`2. Run the Docker container:
- `docker-compose up`## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License. See the LICENSE file for details.
## Acknowledgements
- [Next.js](https://nextjs.org/)
- [MDX](https://mdxjs.com/)
- [Tailwind CSS](https://tailwindcss.com/)
- [Redis](https://redis.io/)
- [shadcn/ui](https://ui.shadcn.com/)
- [Vercel](https://vercel.com/)