In the shadowy corners of the digital underworld, the AlephNull team has birthed a new entity—a different kind of ERP, one that defies the norms and rewrites the rules of the game.
- Getting Started
- Prerequisites
- Installation
- Usage
- Project Structure
- API Endpoints
- Technologies Used
- Contributing
- License
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js (v14 or higher)
- MongoDB
-
Clone the repository:
git clone https://github.com/wittg3n/kazem.git cd kazem
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add the following environment variables:PORT=3001 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret EXPRESS_SESSION=your_session_secret
-
Start the development server:
npm run dev
-
Start the backend server:
node server.js
- Open your browser and navigate to
http://localhost:3000
. - You will be redirected to the login page if you are not authenticated.
- After logging in, you will be redirected to your dashboard page.
.
├── api
│ ├── auth.js
│ └── user.js
├── components
│ ├── Footer.jsx
│ ├── withAuth.jsx
│ └── ...
├── hooks
│ └── useAuth.js
├── pages
│ ├── _app.js
│ ├── dashboard
│ │ └── [userid].jsx
│ └── index.jsx
├── public
│ └── logo.svg
├── schema
│ └── User.js
├── config
│ ├── db.js
│ └── passport.js
├── styles
│ └── globals.css
├── .env
├── package.json
├── server.js
└── README.md
-
POST /auth/login
- Authenticates a user and returns a JWT token.
-
GET /auth/check-auth
- Checks if the user is authenticated by verifying the JWT token.
GET /user/:userid
- Retrieves user data by user ID.
- Frontend: Next.js, React, Tailwind CSS
- Backend: Node.js, Express.js, MongoDB, Mongoose
- Authentication: Passport.js, JWT
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.