Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ClinkedIn/Backend

Repository files navigation

πŸ” LockedIn Backend LockedIn Logo

LockedIn Backend powers the core services of the LockedIn cross-platform application. Built using Node.js, it handles authentication, user data, job listings, media uploads, and payment processing, enabling a seamless and secure professional networking experience.

✨ Features

πŸ” Authentication & Security

  • JWT-based Authentication: Secure, stateless user sessions

  • Firebase OAuth: Google sign-in via Firebase

  • Password Management: Encrypted reset and update

  • Role-based Access Control

  • Input Validation: Ensures secure and clean data

πŸ‘€ User Profiles

  • User CRUD: Create, retrieve, update, delete users

  • Experience & Education: Add professional milestones

  • Skills Management: Showcase technical abilities

  • Media Upload: Upload avatars, resumes via Cloudinary

πŸ”— Networking

  • Connection Requests: Request/accept/reject connections

  • Followers: Follow professionals without direct connections

  • Activity Feed: Track updates and posts

πŸ’Ό Job Features

  • Job Management: Post, edit, and delete job listings

  • Application Submission: Apply to jobs directly

  • Application Tracking: View job status and history

  • Company Profiles: View details of employers

πŸ’¬ Notifications

  • Real-time Notifications via Firebase Cloud Messaging

  • Custom Notification Channels

  • Activity-based Alerts

πŸ’³ Payments (Stripe)

  • Stripe Integration: Payments and subscriptions

  • Checkout Sessions: Secure checkout for premium features

  • Webhook Events: Handle updates from Stripe in real-time

πŸ› οΈ Technologies

Backend Core

  • Node.js – JavaScript runtime

  • Express.js – Web framework

  • MongoDB + Mongoose – NoSQL database and schema modeling

  • Firebase Admin SDK – OAuth and messaging

  • Cloudinary – Media storage and transformations

  • Stripe API – Payment processing

  • JWT – Token-based authentication

Utility

  • dotenv – Environment configuration

  • Multer – File upload middleware

  • CORS – Cross-Origin Resource Sharing

πŸš€ Getting Started

βœ… Prerequisites

  • Node.js (v18+ recommended)

  • MongoDB Atlas or local instance

  • Firebase Project

  • Stripe Account

  • Cloudinary Account

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/tahaaa22/ClinkedIn/Backend.git
cd Backend

Install dependencies

npm install πŸ” Environment Setup Create a .env file in the root directory:

 
 # 🧠 reCAPTCHA
 RECAPTCHA_SECRET_KEY=your-recaptcha-secret-key
 # πŸƒ MongoDB
 MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/LockedIn
 MONGODB_CONNECTION=mongodb+srv://<username>:<password>@cluster.mongodb.net/LockedIn
 # πŸ”₯ Firebase Admin SDK 
 FIREBASE_TYPE=service_account
 FIREBASE_PROJECT_ID=your-project-id
 FIREBASE_PRIVATE_KEY_ID=your-private-key-id
 FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR-PRIVATE-KEY\n-----END PRIVATE KEY-----\n"
 FIREBASE_CLIENT_EMAIL=your-client-email
 FIREBASE_CLIENT_ID=your-client-id
 FIREBASE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
 FIREBASE_TOKEN_URI=https://oauth2.googleapis.com/token
 FIREBASE_AUTH_PROVIDER_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
 FIREBASE_CLIENT_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk@your-project-id.iam.gserviceaccount.com
 FIREBASE_UNIVERSE_DOMAIN=googleapis.com
 # πŸ” JWT Tokens
 ACCESS_TOKEN_SECRET=your-access-token-secret
 REFRESH_TOKEN_SECRET=your-refresh-token-secret
 REFRESH_TOKEN_PATH=/refresh_token
 # ☁️ Cloudinary
 CLOUDINARY_CLOUD_NAME=your-cloud-name
 CLOUDINARY_API_KEY=your-cloudinary-api-key
 CLOUDINARY_API_SECRET=your-cloudinary-api-secret
 # 🌐 App Base URL BASE_URL=http://localhost:3000
 # πŸ“§ Email Service LOCKEDIN_EMAIL=your-email@example.com
 EMAIL_PASSWORD=your-email-app-password

⚠️ Important: Make sure FIREBASE_PRIVATE_KEY is properly escaped or use a JSON key file.

▢️ Run the App

 
 npm run devStart 
 

The server will start on http://localhost:3000 (or your configured port).

πŸ“ Project Structure

LockedIn-Backend/ β”œβ”€β”€ controllers/ # Request handlers β”œβ”€β”€ models/ # Mongoose schemas β”œβ”€β”€ routes/ # API endpoints β”œβ”€β”€ middlewares/ # Auth, validation, error handling β”œβ”€β”€ utils/ # Helper functions └── server.js # App entry point

πŸ”„ API Workflow

  • Authentication – Register/login (email or Google OAuth)

  • Profile Setup – Users complete professional details

  • Networking – Follow or connect with other users

  • Job Exploration – Discover and apply to jobs

  • Payment & Upgrade – Purchase premium plans

  • Notifications – Get real-time updates via FCM

πŸ“‘ API Endpoints (Preview)

Method Endpoint Description
POST /api/user/register Email/password registration
GET /api/user/:id Get user profile
POST /api/jobs/ Create a new job post
POST /api/stripe/create-checkout-session Create Stripe checkout session

πŸ“˜ Full API documentation via Swagger on /api/docs.

πŸ§ͺ Testing

 npm run test

Use Jest for unit/integration testing.

🀝 Contributing

Contributions are welcome! Feel free to fork the repo, create a new branch, and submit a Pull Request.


LockedIn Backend – Powering meaningful professional connections.
Built with ❀️ using Node.js and open-source technologies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /