go-starter

command module
v0.0.0-...-8d4bd71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 12 Imported by: 0

README ΒΆ

πŸš€ Go Starter

This repository serves as a playground for exploring Go (Golang) features, including API development, syntax experimentation, and learning the basics of Go programming. Ideal for beginners and developers looking to get hands-on experience with Go.

πŸ“š Table of Contents

πŸ”§ Technologies Used

  • Frontend: React JS βš›οΈ

  • Backend: Go (Golang) πŸš€

  • Database: MongoDB πŸ—„οΈ

  • UI: Chakra UI 🏠

  • Query: Tanstack Query 🌐

✨ Features

  • πŸ“ CRUD Operations: Create, Read, Update, and Delete operations for user and application data.

  • πŸ“± Responsive UI: Developed using Chakra UI components, ensuring a seamless experience across devices.

  • πŸ“‘ API: Robust API constructed using Express.js and MongoDB for seamless data interaction.

πŸ“– Setup Instructions

πŸ› οΈ Backend Go (Golang)
  1. Clone the repository:

    git clone https://github.com/Fingertips18/go-starter.git
    
  2. Install dependencies:

    cd go-starter
    go mod tidy
    
  3. Set up environment variables. Create a .env file in the root directory::

    MONGO_URI=<MONGO_URI>
    PORT=<PORT>
    MODE=<MODE>
    CLIENT_URL=<CLIENT_URL>
    
  4. Run the backend server:

    go run main.go
    // or
    go install github.com/air-verse/air@latest
    air
    
βš›οΈ Frontend (React JS)
  1. Navigate to the frontend directory:

    cd client
    
  2. Install dependencies:

    npm install
    
  3. Set up environment variables. Create a .env file in the frontend directory:

    VITE_BASE_URL=<VITE_BASE_URL>
    
  4. Run the frontend server:

    npm run dev
    

πŸ“‘ API Endpoints

  • Todos:

  • GET /api/todos: Retrieve a list of todos.

  • GET /api/todos/:id: Retrieve a single todo by ID.

  • POST /api/todos: Create a new todo.

  • PATCH /api/todos/:id: Update an existing todo by ID.

  • DELETE /api/todos/:id: Delete a todo by ID.

🀝 Contributing

Feel free to fork this repository and contribute by submitting a pull request. All contributions are welcome!

πŸ§‘β€πŸ’» Contributors

Ghian Tan @ Fingertips (Github)

πŸ“œ License

This project is licensed under the MIT License.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL