# Packages
# README
š README.md
š Master's Program Networking & Collaboration Platform - Backend
This repository contains the backend implementation for the Master's Program Networking & Collaboration Platform (letusconnect.com). It is a RESTful API built with Golang and the Fiber framework, providing endpoints for user authentication, networking, collaboration, and mentorship.
š Table of Contents
- Project Setup
- Technologies Used
- Folder Structure
- Key Features
- Environment Variables
- Running the Server
- Database Setup
- API Documentation
- Contributing
- License
š ļø Project Setup
1. Clone the Repository
git clone https://github.com/rogerjeasy/go-letusconnect.git
cd go-letusconnect
2. Install Dependencies
go mod download
3. Create a .env
File
Create a .env
file in the root directory and add the following environment variables:
PORT=8080
SMTP_HOST=your-smtp-host
SMTP_PORT=your-smtp-port
SENDER_EMAIL=your-email
SENDER_NAME=your-name
SENDER_PASS=your-email-password
FIREBASE_API_KEY=your-firebase-api-key
ENV_SERVICE_ACCOUNT_KEY=local
JSON_SERVICE_ACCOUNT_PATH=service-account.json
PUSHER_APP_ID=your-pusher-app-id
PUSHER_KEY=your-pusher-key
PUSHER_SECRET=your-pusher-secret
PUSHER_CLUSTER=your-pusher-cluster
4. Running the Server
go run main.go
š» Technologies Used
- Golang - A statically typed, compiled programming language designed at Google.
- Fiber - An Express.js inspired web framework built on top of Fasthttp.
- Firestore - A flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.
- Firebase Authentication - A service that can authenticate users using only client-side code.
- Pusher - A real-time messaging service that allows you to add real-time features to your applications.
š Folder Structure
go-letusconnect
āāā config # Configuration files
āāā handlers # Request handlers
āāā middlewares # Middleware functions
āāā models # Data models
āāā routes # API route definitions
āāā services # application logic and services
āāā utils # Utility functions
āāā .env # Environment variables
āāā go.mod # Go module file
āāā go.sum # Go sum file
āāā main.go # Entry point of the application
āāā README.md # README file
š Key Features
- User Authentication - Register, login, and logout users.
- Profile Management - Update user profile, change password, and reset password.
- Networking Tools - Connect with other users, view connections, and send connection requests.
- Collaboration Tools - Create, view, and join groups, post messages, and comment on posts.
- Mentorship Platform - Apply to be a mentor or mentee, view mentorship requests, and accept or reject requests.
- Real-time messaging - Receive real-time notifications for new connection requests, group invitations, and mentorship requests.
- Email Notifications - Send email notifications for new connection requests, group invitations, and mentorship requests.
- Event Management - Create, view, and join events, and view event details.
- Job Board and Career Resources - Post job listings, view job details, and apply for jobs.
š Environment Variables
- PORT - The port number on which the server will run.
- SMTP_HOST - The SMTP host for sending email notifications.
- SMTP_PORT - The SMTP port for sending email notifications.
- SENDER_EMAIL - The email address of the sender for email notifications.
- SENDER_NAME - The name of the sender for email notifications.
- SENDER_PASS - The password of the sender's email address for email notifications.
- FIREBASE_API_KEY - The API key for Firebase Authentication.
- ENV_SERVICE_ACCOUNT_KEY - The environment variable for the service account key.
- JSON_SERVICE_ACCOUNT_PATH - The path to the service account key file.
- PUSHER_APP_ID - The Pusher app ID.
- PUSHER_KEY - The Pusher key.
- PUSHER_SECRET - The Pusher secret.
- PUSHER_CLUSTER - The Pusher cluster.
š Running the Server
To run the server, execute the following command:
go run main.go
The server will start on the port specified in the .env
file.
š¦ Database Setup
The application uses Firestore as the database. You can set up Firestore by following the steps below:
- Go to the Firebase Console.
- Create a new project.
- Go to the Firestore section and create a new Firestore database.
- Add a new collection called
users
. - Add a new collection called
connections
. - Add a new collection called
groups
.
š API Documentation
API documentation is available via Postman collection or Swagger (if implemented).
š¤ Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/awesome-feature
) - Commit your Changes (
git commit -m 'Add some awesome feature'
) - Open a Pull Request
š License
Distributed under the MIT License. See LICENSE
for more information.