Sumeru Akademiya API is a simple Express project using Prisma, providing endpoints to manage students, darshans (faculty) and users.
The Sumeru Akademiya case problem involves managing student data for an academy. The API provides CRUD operations for student entities. Refer to the API documentation for detailed information on each endpoint and their use cases.
- CRUD operations for students
- User authentication with JWT
- Hashed password storage using bcrypt
- Prisma ORM for database interaction
- Node.js (v14 or higher)
- npm or yarn
- SQLite database
- ORM Prisma
- ExpressJS
-
Clone the repository:
git clone https://github.com/najwatahir/sumeru-akademiya-api.git
-
Navigate to project directory
cd sumeru-akademiya-api
-
Install depedencies
npm install -
Run Database migrations
npx prisma migrate dev
-
Don't forget to remove the
.exampleon.envfile -
Start the server
npm run dev
Update the .env file with your database connection URL, JWT secret, and any other configuration variables.
JWT_SECRET="your_jwt_secret_key"
Access the API at http://localhost:3000 or the specified port in your .env file.
You can use tools like Postman or curl to interact with the API.
GET /students: Retrieve all students. GET /students/:id: Retrieve a specific student by ID. POST /students: Create a new student. PUT /students/:id: Update a student by ID. DELETE /students/:id: Delete a student by ID. POST /login: Authenticate and obtain a JWT token.
Feel free to contribute by opening issues or creating pull requests. Follow the contribution guidelines for more information.
Make sure to replace placeholders like yourusername, username:password@localhost:5432/sumeru_akademiya, and "your_jwt_secret_key" with your actual details.
visit this link to see the documentation on postman: https://documenter.getpostman.com/view/29807114/2s9YXk52Ug