Go-Notes is a full-stack web application for creating, managing, and storing personal notes. It provides user authentication and CRUD (Create, Read, Update, Delete) functionality for notes. The application is built using modern web technologies, including React for the frontend and Go (Golang) for the backend.
- User Authentication: Secure login and registration system using JWT (JSON Web Tokens).
- Note Management: Create, view, edit, and delete notes with a user-friendly interface.
- Persistent Storage: Notes are stored in a PostgreSQL database with GORM for ORM.
- Backend API: RESTful API built with Go and Fiber for fast and scalable server-side operations.
- Frontend: Developed with React and Vite for a responsive and dynamic user experience.
- State Management: Redux Toolkit with persist functionality for managing authentication state.
- React: A JavaScript library for building user interfaces.
- Vite: A fast build tool for frontend development.
- Redux Toolkit: For state management and persistence.
- CSS: Used for styling components.
- Go: A statically typed programming language for backend development.
- Fiber: A web framework for Go inspired by Express.js.
- GORM: ORM for database interactions with PostgreSQL.
- JWT: Used for secure user authentication.
- Node.js (for the frontend)
- Go (for the backend)
- PostgreSQL (for the database)
-
Clone the repository:
git clone https://github.com/abhijeetsharan/Go-Notes.git cd Go-Notes -
Setup the Backend:
- Navigate to the
serverdirectory:cd server - Set up environment variables in a
.envfile:DB_URL=your_postgres_database_url JWT_SECRET=your_jwt_secret FRONTEND_URL=http://localhost:3000
- Install dependencies and run the server:
go mod tidy go run main.go
- Navigate to the
-
Setup the Frontend:
- Navigate to the
clientdirectory:cd ../client - Install dependencies:
npm install
- Start the development server:
npm run dev
- Navigate to the
- Open the frontend in your browser at
http://localhost:3000. - Register a new account or log in with existing credentials.
- Create, view, edit, or delete notes as needed.
POST /api/register: Register a new user.POST /api/login: Login and receive a JWT.
POST /api/notes: Create a new note.GET /api/notes: Retrieve all notes for the authenticated user.PUT /api/notes/:id: Update a note by ID.DELETE /api/notes/:id: Delete a note by ID.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License.