Want to see TechNotes in action? Click the button below to launch the app:
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
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.
- ๐ 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
|
|
|
|
Get your secure note management system running in under 5 minutes:
- Node.js 18+ (Latest LTS recommended)
- MongoDB (Local installation or Atlas cluster)
- npm or yarn package manager
- Modern browser with JavaScript enabled
# 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
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
# 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!
Username: admin
Password: admin123
Role: Admin
โ ๏ธ Security Note: Change the default admin credentials immediately in production!
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
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
- 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
// 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",
}),
}),
}),
});
// 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())
);
// 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();
};
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
Great software is built by passionate communities. Join us in making TechNotes even better:
- ๐ 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
# 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
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.
โญ Star this repo if you found it helpful!
Made with ๐ for teams who value security and productivity




