This is a Todo List application developed using Next.js with Tailwind CSS for front-end styling and PocketBase for the backend API to handle CRUD operations. This project provides a modern and responsive interface for managing tasks efficiently.
- You can view my deployed version here: https://diesos-nextnote.netlify.app/
- Next.js: Utilizes server-side rendering and static site generation for improved performance and SEO.
- Tailwind CSS: Utility-first CSS framework for creating responsive and customizable user interfaces.
- PocketBase: A lightweight, self-hosted backend solution that offers API CRUD capabilities for managing tasks.
- Next.js: React-based framework for building the front end.
- Tailwind CSS: CSS framework for styling and layout.
- PocketBase: Backend server for managing data and API interactions.
- Node.js (v18 or above)
- NPM or Yarn package manager
- PocketBase (download from PocketBase)
-
Clone the repository:
git clone https://github.com/diesos/nextjs.git cd nextjs -
Install dependencies:
npm install # or yarn install -
Start the PocketBase server:
- Download PocketBase according to your operating system.
- Paste the PocketBase file in the root of your project
- Run the following command:
./pocketbase serve
-
Create a
.env.localfile in the root directory to store environment variables:NEXT_PUBLIC_DB_HOST=http://127.0.0.1:8090
Ensure that this URL corresponds to your running PocketBase instance.
-
Start the Next.js development server:
npm run dev # or yarn devThe app will be available at http://localhost:3000.
- Access the Todo List application at http://127.0.0.1:8090/_/ with admin access for the creation fo the collection.
- Use the PocketBase backend to manage your tasks through CRUD operations.
npm run dev: Starts the development server.npm run build: Builds the application for production.npm run start: Runs the built app in production mode.
/pages: Contains the Next.js pages for routing./components: Reusable UI components for the Todo List. (shadcn)/styles: Global and component-specific styles, including Tailwind CSS./utils: Helper functions and utilities.
Ensure PocketBase is running to access API endpoints for CRUD operations:
- Create: POST
/api/todo - Read: GET
/api/todo/{id} - Update: PUT
/api/todo/{id} - Delete: DELETE
/api/todo/{id}
These endpoints allow for easy interaction between the Next.js frontend and the PocketBase backend.
- Build the application for production:
npm run build
- Start the production server:
npm run start
You can also deploy to platforms like Vercel, Netlify, or AWS for a scalable production setup.
Feel free to submit issues, feature requests, and pull requests to improve this project.
This project is licensed under the MIT License.
- Next.js: Framework for building server-side rendered applications.
- Tailwind CSS: CSS library for styling.
- PocketBase: Simple backend solution for data management.
Feel free to modify any sections or reach out if you have any questions!
Happy coding!