A full-stack application for managing configurations, featuring a React-based frontend and an Express Node.js backend.
- React 19
- TypeScript
- Vite
- Tailwind CSS
- React Router DOM
- Lucide React (Icons)
- React Markdown
- Node.js
- Express
- JSON Web Tokens (JWT) for Authentication
- bcryptjs for password hashing
- PostgreSQL (optional but recommended for persistent config storage on Render.com)
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher recommended)
- npm (Node Package Manager)
The server directory includes a .env file with pre-configured settings:
JWT_SECRET=super-secret-key-change-this-in-production
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=$2b$10$...
PORT=3000
DATABASE_URL=postgresql://... # Optional: For persistent config storageLogin Credentials: The default credentials are admin / password (bcrypt hashed). These will work immediately after installation and persist after deployment.
JWT_SECRET to a unique value to ensure secure token generation.
📊 Database Configuration (Recommended for Production):
For production deployments on Render.com or other platforms, configure DATABASE_URL to persist configs across service restarts:
- See DATABASE_SETUP.md for detailed PostgreSQL setup instructions
- Without DATABASE_URL, configs are stored in the local filesystem and will be lost on service restarts (on Render.com)
- Local development works fine without a database
To change credentials:
- Generate a new bcrypt hash:
cd server node -e "const bcrypt = require('bcryptjs'); bcrypt.hash('new_password', 10).then(hash => console.log(hash));"
- Update the
.envfile with your newADMIN_USERNAMEandADMIN_PASSWORD_HASH
-
Clone the repository and navigate into the project root:
git clone <repository-url> cd config-manager
-
Install backend dependencies:
cd server npm install -
Install frontend dependencies:
cd ../client npm install -
The
.envfile is already included in the repository with default credentials.
A convenient start.sh script is provided in the root directory to start both the client and server concurrently.
-
Make sure the script is executable:
chmod +x start.sh
-
Run the script:
./start.sh
This will:
- Stop any existing node processes running on ports 3000 and 5173.
- Start the Express server on
http://localhost:3000. - Start the Vite React development server on
http://localhost:5173.
To run the server manually:
cd server
node server.jsTo run the client manually:
cd client
npm run devconfig-manager/
├── client/ # React frontend application
│ ├── public/ # Static assets
│ ├── src/ # Frontend source code
│ └── package.json # Frontend dependencies
├── server/ # Express backend application
│ ├── certs/ # SSL Certificates
│ ├── deployed_configs/ # Dynamically deployed configurations
│ ├── .env # Environment variables (includes login credentials)
│ ├── server.js # Express server entry point
│ └── package.json # Backend dependencies
├── start.sh # Script to start both client and server
└── .gitignore # Git ignore file for the root project
To build the React application for production, navigate to the client directory and run:
cd client
npm run buildThe optimized production build will be available in the client/dist directory.
-
Build the frontend:
cd client && npm run build
-
The
.envfile with pre-configured credentials is included in the repository - just deploy it with the server. Important: ChangeJWT_SECRETto a unique value for production. -
Start the server:
cd server node server.js -
Serve the built frontend using a reverse proxy (e.g., Nginx) or use the client as a static build served by the Express server.
Create a Dockerfile in the root:
FROM node:18
WORKDIR /app
# Copy package files
COPY server/package*.json ./server/
COPY client/package*.json ./client/
# Install dependencies
RUN cd server && npm install
RUN cd client && npm install
# Build frontend
RUN cd client && npm run build
# Copy server code and built frontend
COPY server/ ./server/
COPY client/dist ./server/public
WORKDIR /app/server
EXPOSE 3000
CMD ["node", "server.js"]The .env file is included in the repository, so credentials will persist across deployments. The password is bcrypt-hashed for security.