Skip to content

TechNotes is a secure note and task management app powered by JWT authentication for user login. It lets users create, organize, and complete tasks while keeping detailed notes, all in an intuitive interface. Designed for efficiency, it ensures data protection and seamless access, making it perfect for work, study, or personal planning.

Notifications You must be signed in to change notification settings

AlexanderPotiagalov/TechNotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

119 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

TechNotes

TechNotes Dashboard Preview

Secure, role-based note management system for modern teams. Built for productivity, secured by design.

License Last Commit Top Language GitHub Stars

Built with:ย 
MongoDB Express.js React Node.js Redux Toolkit RTK Query Tailwind CSS JWT REST API bcrypt Postman



๐Ÿš€ Live Demo

Want to see TechNotes in action? Click the button below to launch the app:

๐Ÿš€ Launch TechNotes

For full access to all features, feel free to start a discussion or reach out on LinkedIn.
If you'd just like to explore some functionality without full permissions, use:
Username: Bro ย  | ย  Password: Code (Full permissions are granted only upon request.)


๐Ÿ“œ Table of Contents

๐Ÿ“– Overview

TechNotes revolutionizes team collaboration with a secure, intelligent note management system. Designed for modern workplaces, it combines enterprise-grade security with intuitive user experience. Whether you're managing a small team or a large organization, TechNotes provides the tools you need to keep everyone organized and productive.

๐ŸŒŸ Why Choose TechNotes?

  • ๐Ÿ”’ Enterprise Security โ€” Military-grade JWT authentication with refresh token rotation
  • ๐Ÿ‘ฅ Role-Based Access โ€” Granular permissions for Employees, Managers, and Admins
  • โšก Lightning Fast โ€” Optimized with RTK Query caching and optimistic updates
  • ๐ŸŒ Cloud-Ready โ€” Scalable MERN architecture with MongoDB Atlas integration
  • ๐Ÿ“ฑ Mobile-First โ€” Responsive design that works perfectly on any device
  • ๐Ÿ”„ Real-Time Sync โ€” Automatic token refresh and persistent login sessions
  • ๐ŸŽฏ Zero Maintenance โ€” Self-healing authentication with automatic cleanup

๐Ÿ“ธ UI Screenshots

๐Ÿ” Secure Login โ€ข ๐Ÿ“‹ Intuitive Dashboard โ€ข ๐Ÿ“ Smart Notes โ€ข ๐Ÿ‘ฅ Admin Controls

โœจ Features

๐Ÿ” Advanced Security

  • Dual-Token Authentication with access & refresh tokens
  • Automatic Token Rotation for enhanced security
  • HttpOnly Cookies preventing XSS attacks
  • CORS Protection with secure cookie handling
  • Session Persistence across browser restarts
  • Automatic Logout on token expiration

๐Ÿ‘ฅ Smart User Management

  • Role-Based Permissions (Employee/Manager/Admin)
  • User CRUD Operations with validation
  • Profile Management with secure password updates
  • Activity Tracking and audit logs
  • Bulk Operations for efficient management
  • Advanced Search and filtering options

๐Ÿ“ Intelligent Notes System

  • Rich Text Editor with markdown support
  • Real-Time Collaboration on shared notes
  • Version History with rollback capabilities
  • Smart Categorization and tagging
  • Advanced Search with full-text indexing
  • Export Options in multiple formats

โšก Performance Optimized

  • RTK Query Caching for lightning-fast responses
  • Optimistic Updates for instant feedback
  • Entity Adapters for normalized state management
  • Code Splitting for faster load times
  • Progressive Enhancement for older browsers
  • Memory Efficient rendering and updates

๐Ÿ› ๏ธ Tech Stack

Technology Purpose Why We Chose It
MongoDB Database Flexible schema & horizontal scaling capabilities
Express.js Backend API Minimal overhead & extensive middleware ecosystem
React Frontend UI Component-based architecture & excellent ecosystem
Node.js Runtime JavaScript everywhere & exceptional NPM ecosystem
Redux Toolkit State Mgmt Predictable state updates & powerful dev tools
Tailwind Styling Utility-first approach & rapid prototyping

๐Ÿš€ Quick Start

Get your secure note management system running in under 5 minutes:

Prerequisites

  • Node.js 18+ (Latest LTS recommended)
  • MongoDB (Local installation or Atlas cluster)
  • npm or yarn package manager
  • Modern browser with JavaScript enabled

Installation

# Clone the repository
git clone https://github.com/yourusername/TechNotes.git
cd TechNotes

# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../client
npm install

Environment Setup

Create .env in the backend directory:

# Server Configuration
PORT=3500
NODE_ENV=development

# Database
MONGO_URI=mongodb://localhost:27017/TechNotes
# Or for MongoDB Atlas:
# MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/TechNotes

# JWT Secrets (generate strong secrets in production!)
ACCESS_TOKEN_SECRET=your-super-secret-access-token-key-here
REFRESH_TOKEN_SECRET=your-super-secret-refresh-token-key-here

# CORS Configuration
CLIENT_URL=http://localhost:3000

Launch the Application

# Terminal 1: Start backend server
cd backend
npm run dev

# Terminal 2: Start frontend client
cd client
npm run dev

๐ŸŽ‰ Success! Navigate to http://localhost:3000 and start managing your notes!

Default Admin Account

Username: admin
Password: admin123
Role: Admin

โš ๏ธ Security Note: Change the default admin credentials immediately in production!


๐Ÿ“ Project Architecture

Our architecture follows industry best practices for maintainability and scalability:

TechNotes/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”œโ”€โ”€ dbConn.js           # MongoDB connection & error handling
โ”‚   โ”‚   โ”œโ”€โ”€ allowedOrigins.js   # Defines which URL's are allowed for CORS
โ”‚   โ”‚   โ””โ”€โ”€ corsOptions.js      # CORS configuration & whitelist
โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ authController.js   # Login, refresh, logout logic
โ”‚   โ”‚   โ”œโ”€โ”€ usersController.js  # User CRUD operations
โ”‚   โ”‚   โ””โ”€โ”€ notesController.js  # Notes CRUD operations
โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ”œโ”€โ”€ errorHandler.js     # Log errors (name, message, url, etc...)
โ”‚   โ”‚   โ”œโ”€โ”€ verifyJWT.js        # JWT token verification
โ”‚   โ”‚   โ”œโ”€โ”€ loginLimiter.js     # Rate limiting for login attempts
โ”‚   โ”‚   โ””โ”€โ”€ logger.js           # Request logging middleware
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”œโ”€โ”€ User.js             # User schema with roles & validation
โ”‚   โ”‚   โ””โ”€โ”€ Note.js             # Note schema with user references
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ authRoutes.js       # Authentication endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ userRoutes.js       # User management endpoints
โ”‚   โ”‚     โ”œโ”€โ”€ root.js             # Serves index.html for index routes.
โ”‚   โ”‚   โ””โ”€โ”€ noteRoutes.js       # Notes management endpoints
โ”‚   โ”œโ”€โ”€ view/
โ”‚   โ”‚   โ”œโ”€โ”€ 404.html            # Page not found html
โ”‚   โ”‚   โ””โ”€โ”€ index.html          # Backend html
โ”‚   โ””โ”€โ”€ server.js               # Express app setup & middleware
โ”œโ”€โ”€ client/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ store.js        # Redux store configuration
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ api/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ apiSlice.js # RTK Query base API setup
โ”‚   โ”‚   โ”œโ”€โ”€ config/
โ”‚   โ”‚   โ”‚    โ”œโ”€โ”€ roles.js        # Defines Roles   
โ”‚   โ”‚   โ”œโ”€โ”€ features/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth/           # Authentication components & logic
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Login.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PersistLogin.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authApiSlice.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authSlice.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ RequireAuth.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Prefetch.js
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Welcome.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ users/          # User management features
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UsersList.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EditUserForm.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ NewUserForm.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ User.js
โ”‚   โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ EditUser.js
โ”‚   โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ UsersApiSlice.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ notes/          # Notes management features
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ NotesList.js
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ EditNote.js
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ EditNoteForm.js
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ NewNote.js
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ NewNoteForm.js
โ”‚   โ”‚   โ”‚       โ”œโ”€โ”€ Note.js
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ notesApiSlice.js
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Layout.js       # Main app layout
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Public.js       # Landing page
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DashHeader.js   # Dashboard header
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ DashFooter.js   # Dashboard footer
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ DashLayout.js   # Dashboard Layout
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ useAuth.js      # Authentication hook
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ useTitle.js     # Title hook
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ usePersist.js   # Persistence toggle hook
โ”‚   โ”‚   โ”œโ”€โ”€ App.js              # Main app component & routing
โ”‚   โ”‚   โ”œโ”€โ”€ index.js            
โ”‚   โ”‚   โ”œโ”€โ”€ index.css
โ”‚   โ””โ”€โ”€ public/
โ”‚       โ”œโ”€โ”€ favicon.ico
โ”‚       โ””โ”€โ”€ screenshots/        # UI screenshots for documentation
โ””โ”€โ”€ README.md

๐Ÿ” Authentication Flow

Our security-first approach ensures your data stays protected:

sequenceDiagram
    participant C as Client
    participant S as Server
    participant DB as Database

    C->>S: POST /auth (credentials)
    S->>DB: Validate user credentials
    DB-->>S: User data
    S->>S: Generate JWT tokens
    S->>C: Access token + HttpOnly refresh cookie

    Note over C,S: Normal API requests
    C->>S: API request + Bearer token
    S->>S: Verify access token
    S-->>C: API response

    Note over C,S: Token refresh flow
    C->>S: API request (expired token)
    S-->>C: 401 Unauthorized
    C->>S: POST /auth/refresh (cookie)
    S->>S: Verify refresh token
    S-->>C: New access token
    C->>S: Retry API request

    Note over C,S: Logout
    C->>S: POST /auth/logout
    S->>S: Clear refresh token
    S-->>C: Success + Clear cookie
Loading

Security Features

  • 15-minute Access Tokens minimize exposure window
  • 7-day Refresh Tokens balance security with UX
  • HttpOnly Cookies prevent XSS token theft
  • CORS Protection restricts origin access
  • Rate Limiting prevents brute force attacks
  • Automatic Cleanup removes expired tokens

๐ŸŽฎ Usage Examples

Authentication API

// Login user
const loginUser = async (credentials) => {
  const response = await fetch("/auth", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(credentials),
    credentials: "include", // Include cookies
  });
  return response.json();
};

// Automatic token refresh with RTK Query
const authSlice = apiSlice.injectEndpoints({
  endpoints: (builder) => ({
    refresh: builder.mutation({
      query: () => ({
        url: "/auth/refresh",
        method: "GET",
      }),
    }),
  }),
});

Notes Management

// Create new note with optimistic updates
const [createNote] = useCreateNoteMutation();

const handleCreateNote = async (noteData) => {
  try {
    await createNote({
      title: noteData.title,
      text: noteData.text,
      user: userId,
    }).unwrap();
    // Optimistic update already handled by RTK Query
  } catch (error) {
    console.error("Failed to create note:", error);
  }
};

// Real-time note filtering
const { data: notes, isLoading } = useGetNotesQuery();
const filteredNotes = notes?.filter((note) =>
  note.title.toLowerCase().includes(searchTerm.toLowerCase())
);

User Management (Admin Only)

// Role-based component rendering
const UserManagement = () => {
  const { isManager, isAdmin } = useAuth();

  if (!isManager && !isAdmin) {
    return <Navigate to="/dash" replace />;
  }

  return (
    <div className="user-management">
      {isAdmin && <AdminControls />}
      <UserList />
    </div>
  );
};

// Bulk user operations
const [updateUsers] = useUpdateUsersMutation();

const handleBulkRoleUpdate = async (userIds, newRole) => {
  const updates = userIds.map((id) => ({ id, roles: [newRole] }));
  await updateUsers({ updates }).unwrap();
};

๐Ÿ”ฎ Roadmap

We're focused on delivering powerful features to improve team productivity and collaboration:

  • ๐ŸŒ™ Dark Mode โ€” Sleek UI with automatic theme switching
  • ๐Ÿ” Advanced Search โ€” Full-text search with filters and sorting
  • ๐Ÿ“ Folders & Tags โ€” Organize notes with custom tags and nested folders
  • ๐Ÿ“Š Analytics Dashboard โ€” Visual insights into usage and performance
  • ๐Ÿค Real-Time Collaboration โ€” Edit notes live with your team

๐Ÿค Join Our Community

Great software is built by passionate communities. Join us in making TechNotes even better:

๐Ÿ’ฌ Get Involved

Discussions Issues Pull Requests

Ways to Contribute

  • ๐Ÿ› Bug Reports โ€” Help us identify and fix issues quickly
  • ๐Ÿ’ก Feature Requests โ€” Share your ideas for new functionality
  • ๐Ÿ”ง Code Contributions โ€” Submit pull requests for improvements
  • ๐Ÿ“š Documentation โ€” Improve guides, tutorials, and API docs
  • ๐ŸŽจ Design & UX โ€” Enhance UI/UX and create marketing assets
  • ๐Ÿ—ฃ๏ธ Community Support โ€” Help other users in discussions
  • ๐ŸŽ“ Educational Content โ€” Create tutorials and best practices guides
  • ๐Ÿ” Testing โ€” Help test new features and report feedback
  • ๐ŸŒ Translations โ€” Add support for new languages

Development Guidelines

# Fork the repository
git clone https://github.com/yourusername/TechNotes.git
cd TechNotes

# Create feature branch
git checkout -b feature/amazing-feature

# Make your changes
npm run test          # Run tests
npm run lint          # Check code style
npm run type-check    # Verify TypeScript

# Commit with conventional commits
git commit -m "feat: add amazing new feature"

# Push and create PR
git push origin feature/amazing-feature

๐Ÿ“„ License & Credits

TechNotes is open source and available under the MIT License.

Built with modern web technologies and a commitment to security and user experience.


๐Ÿ‘จโ€๐Ÿ’ป Created with โค๏ธ by Alexander Potiagalov

Securing teams, one note at a time.


GitHub Stars GitHub Forks GitHub Watchers Contributors

โญ Star this repo if you found it helpful!

Made with ๐Ÿ”’ for teams who value security and productivity

About

TechNotes is a secure note and task management app powered by JWT authentication for user login. It lets users create, organize, and complete tasks while keeping detailed notes, all in an intuitive interface. Designed for efficiency, it ensures data protection and seamless access, making it perfect for work, study, or personal planning.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published