GoWithReact is a foundational full-stack project combining a Go backend with a React frontend. It demonstrates token-based authentication and efficient routing, making it a great starting point for building scalable web applications.
- Backend (Go):
- REST API with JWT authentication using
golang-jwt/jwt/v4
- MongoDB integration with
go.mongodb.org/mongo-driver
- Configurable environment variables using
joho/godotenv
- REST API with JWT authentication using
- Frontend (React):
- Intuitive user interface with React Router
- Interaction with secure backend APIs
- Backend: Go, Gin framework, MongoDB, JWT
- Frontend: React, React Router
- Authentication: JSON Web Tokens (JWT)
- Go (v1.19+)
- Node.js (v14+)
- npm or yarn
- Clone the repository:
git clone https://github.com/biswajitpanday/GoWithReact.git cd GoWithReact/backend
- Install dependencies:
go mod tidy
- Create a
.env
file with the necessary configurations (example below):MONGO_URI=mongodb://localhost:27017 JWT_SECRET=your_secret_key
- Run the server:
The server will start on http://localhost:3200.
go run main.go
- Navigate to the frontend directory:
cd ../frontend
- Install dependencies:
npm install
- Start the React app:
Access the application at http://localhost:3000.
npm start
- Register for a new account.
- Log in using your credentials.
- Test secure routes and API interactions between the React frontend and Go backend.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes and push them:
git push origin feature-name
- Submit a pull request.
This project is licensed under the MIT License. Feel free to use and modify it as needed.
Created by Biswajit Panday.
For questions or feedback, reach out at:
- Email: biswajitmailid@gmail.com
- GitHub: @biswajitpanday
Enjoy coding with GoWithReact! 🚀