• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
shivaam2804

shivaam2804

useraccessmanagement

Public
Like
useraccessmanagement
Home
Code
3
backend
4
frontend
3
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

User Access Management System

A comprehensive system for managing user access to software applications with role-based permissions.

Features

  • User registration and authentication with JWT
  • Role-based access control (Employee, Manager, Admin)
  • Software listing and creation (Admin only)
  • Access request submission (Employee)
  • Request approval workflow (Manager)

Tech Stack

  • Backend: Node.js + Express.js
  • Frontend: React
  • Database: PostgreSQL
  • ORM: TypeORM
  • Authentication: JWT
  • Other tools: bcrypt, dotenv, nodemon

Project Structure

├── backend/                 # Node.js + Express backend
│   ├── src/
│   │   ├── controllers/     # Request handlers
│   │   ├── entities/        # TypeORM entities
│   │   ├── middleware/      # Auth and validation middleware
│   │   ├── routes/          # API routes
│   │   ├── services/        # Business logic
│   │   ├── utils/           # Helper functions
│   │   ├── app.ts           # Express app setup
│   │   └── index.ts         # Entry point
│   ├── .env.example         # Environment variables template
│   ├── package.json         # Dependencies
│   └── tsconfig.json        # TypeScript configuration
├── frontend/                # React frontend
│   ├── public/              # Static assets
│   ├── src/
│   │   ├── components/      # Reusable UI components
│   │   ├── contexts/        # React contexts (Auth)
│   │   ├── pages/           # Page components
│   │   ├── services/        # API service functions
│   │   ├── types/           # TypeScript interfaces
│   │   ├── utils/           # Helper functions
│   │   ├── App.tsx          # Main app component
│   │   └── index.tsx        # Entry point
│   ├── package.json         # Dependencies
│   └── tsconfig.json        # TypeScript configuration
└── README.md                # Project documentation

API Endpoints

Authentication

  • POST /api/auth/signup - Register a new user (default role: Employee)
  • POST /api/auth/login - Authenticate and receive JWT

Software Management (Admin only)

  • GET /api/software - List all software
  • POST /api/software - Create new software
  • GET /api/software/:id - Get software details
  • PUT /api/software/:id - Update software
  • DELETE /api/software/:id - Delete software

Access Requests

  • GET /api/requests - List requests (filtered by role)
  • POST /api/requests - Submit new access request (Employee)
  • PATCH /api/requests/:id - Approve/reject request (Manager)
  • DELETE /api/requests/:id - Delete request

Setup Instructions

Prerequisites

  • Node.js (v14+)
  • PostgreSQL
  • npm or yarn

Backend Setup

  1. Navigate to the backend directory: cd backend
  2. Install dependencies: npm install
  3. Copy .env.example to .env and configure your environment variables
  4. Run database migrations: npm run migration:run
  5. Start the development server: npm run dev

Frontend Setup

  1. Navigate to the frontend directory: cd frontend
  2. Install dependencies: npm install
  3. Start the development server: npm start

User Roles

  • Employee: Can register, login, and request software access
  • Manager: Can view and approve/reject access requests
  • Admin: Can create and manage software, has full access to the system
Code
backendfrontendREADME.md
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.