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

abasisgenius/workforce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

42 Commits

Repository files navigation

πŸ’Ό Workforce

Collaborative workspace dashboard for tracking teams, features and real-time availability and information.

🧭 Overview

Workforce: A full-stack web app that helps distributed teams stay aligned. The backend provides secure authentication, workspace and feature management and roadmaps stored in and by MongoDB. The React front-end has a great intuitive Interface with a dashboard where teammates can create/join workspaces, join ongoing features, manage feature assignments, and update their current status.

πŸ› οΈ Tech Stack

  • Frontend: React 19, Vite, Tailwind CSS, Framer Motion, React Router, Testing Library, Vitest
  • Backend: Node.js, Express 5, Mongoose (MongoDB), JWT authentication, bcrypt, dotenv, CORS
  • Tooling & Build: npm, Vite dev server, SWC React plugin, PostCSS/Autoprefixer

βš™οΈ Installation & Setup

  1. Clone & install dependencies
    git clone <repo-url>
    cd workforce-app
    npm install --prefix workforce-backend
    npm install --prefix workforce-frontend
  2. Configure environment variables (backend)
    Create workforce-backend/.env with:
    MONGODB_URI=mongodb+srv://<user>:<password>@<cluster>/<db>
    JWT_SECRET=super-secret-key
    PORT=3001 # optional; defaults to 3001
  3. Start the backend API
    cd workforce-backend
    node index.js
  4. Start the frontend
    cd ../workforce-frontend
    npm run dev
  5. Open the frontend URL from the Vite output (defaults to http://localhost:5173) and ensure the API is reachable at http://localhost:3001.

πŸ“š Usage & How It Works

  • Register & login: Create an account or sign in. Backend generates a JWT, which the frontend stores in localStorage.
  • Create workspaces: In the homepage, create new workspaces that automatically add you as the admin and first member.
  • Invite teammates: Share the workspace ID so others can join via the "Join workspace" form right in the homepage.
  • Create and Plan features: In each workspace dashboard, track items, join or leave features, and delete outdated/completed work.
  • Broadcast status: Update your availability (Working, Lunch, Offline) so teammates can see who is online in the staff panel.

πŸ—‚οΈ Project Structure

workforce-app/
β”œβ”€β”€ workforce-backend/
β”‚ β”œβ”€β”€ index.js # Express entry point and route wiring
β”‚ β”œβ”€β”€ routes/ # Auth, workspace, feature, and user controllers
β”‚ β”œβ”€β”€ models/ # Mongoose schemas for User, Workspace, Feature
β”‚ └── middleware/ # JWT authentication guard
└── workforce-frontend/
 β”œβ”€β”€ src/
 β”‚ β”œβ”€β”€ pages/ # Home, login/register, profile, workspace dashboard
 β”‚ β”œβ”€β”€ components/ # Header, forms, dashboard panels, cards
 β”‚ └── context/ # Auth context & provider
 β”œβ”€β”€ tailwind.config.js
 └── vite.config.mjs

🧾 API Endpoints

Method Route Description Auth
GET /api/health Service heartbeat None
POST /api/auth/register Create a new user account No
POST /api/auth/login Authenticate user & return JWT No
POST /api/workspaces Create a workspace and add creator as admin Bearer
GET /api/workspaces List workspaces the user belongs to Bearer
GET /api/workspaces/:id Retrieve workspace details plus members Bearer
PATCH /api/workspaces/:id/join Join an existing workspace by ID Bearer
DELETE /api/workspaces/:id Delete a workspace (admin only) Bearer
POST /api/features Create a feature within a workspace Bearer
GET /api/features/:workspaceId List features for a workspace Bearer
PATCH /api/features/:id/join Assign current user to a feature Bearer
PATCH /api/features/:id/leave Remove current user from a feature Bearer
DELETE /api/features/:id Remove a feature from its workspace Bearer
GET /api/users/me Fetch the authenticated user profile Bearer
PATCH /api/users/profile Update profile details (name, email, timezone) Bearer
PATCH /api/users/status Update the user's availability status Bearer
GET /api/users/status Get the current user's status value Bearer

All protected routes expect Authorization: Bearer <token> header using the JWT token issued during login or registration.

🀝 Contact & Credits

  • Product & engineering: @abasisgenius
  • Built by Abbas Mahin using React + Express + MongoDB.

πŸ–ΌοΈ Screenshots

to be added

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

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