Skip to content

ding1dingx/GitBase

 
 

Repository files navigation

GitBase

GitBase is an open-source dynamic website solution without a traditional database, built with Next.js, Tailwind CSS, and Shadcn/UI. It leverages GitHub as a content management system, providing a seamless way to create and manage website content.

GitBase

Deploy on Vercel

Deploy with Vercel

Features

  • Database-free Architecture: Utilizes GitHub for content storage and management.
  • Dynamic Content: Renders content dynamically using Next.js server-side rendering.
  • Markdown Support: Write your content in Markdown format for easy editing and version control.
  • Admin Interface: Built-in admin panel for content management.
  • Responsive Design: Fully responsive design using Tailwind CSS.
  • SEO Friendly: Optimized for search engines with dynamic metadata.
  • Easy Deployment: Simple deployment process to Vercel.

Prerequisites

  • Node.js (version 14 or later)
  • npm (comes with Node.js)
  • Git
  • GitHub account
  • Vercel account (for deployment)

Installation

  1. Clone the repository:

    git clone https://github.com/qiayue/gitbase.git
    cd gitbase
    
  2. Install dependencies:

    npm install
    
  3. Create a .env.local file in the root directory and add the following:

    GITHUB_TOKEN=your_github_personal_access_token
    GITHUB_OWNER=your_github_username
    GITHUB_REPO=your_repo_name
    ACCESS_PASSWORD=your_secure_access_password
    
  4. Set up your GitHub repository:

    • Create a new repository on GitHub
    • Create two folders in the repository: data/json and data/md
    • In data/json, create a file named resources.json with an empty array: []
  5. Run the development server:

    npm run dev
    

Visit http://localhost:3000 to see your GitBase instance running locally.

Deployment

  1. Push your code to GitHub.
  2. Log in to Vercel and create a new project from your GitHub repository.
  3. Configure the environment variables in Vercel:
    • GITHUB_TOKEN
    • GITHUB_OWNER
    • GITHUB_REPO
    • ACCESS_PASSWORD
  4. Deploy the project.

For a detailed deployment guide, please refer to our Installation and Deployment Guide.

Usage

  • Access the admin panel by navigating to /admin and using your ACCESS_PASSWORD.
  • Create and edit articles through the admin interface.
  • Manage resources in the admin panel.
  • All changes are automatically synced with your GitHub repository.

Contributing

We welcome contributions to GitBase! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

License

GitBase is open-source software licensed under the MIT license.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository.

Acknowledgements

GitBase is built with the following open-source libraries:

We are grateful to the maintainers and contributors of these projects.

About

Github Based Simple Website Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.8%
  • TypeScript 30.0%
  • CSS 2.2%