The Library is a web application that allows users to view all available books and see details of each book. To add a book to your shelf to read later or to publish a new book, you need to have an account. The project features JWT authentication and uses MongoDB as the database. The frontend is developed with React, using React Router DOM and Axios for API interactions. For more detailed documentation, please refer to the Project Documentation.
- Lucas Dias Custodio da Silva
- Vinicius Antunes
- Backend: Django with MongoDB.
- Frontend: React with React Router DOM and Axios.
- View all books.
- View details of each book.
- JWT Authentication (Login and Registration).
- Add books to the shelf (authenticated users only).
- Publish new books (authenticated users only).
- Edit your user.
- Node.js
- Python 3.11
- MongoDB
- pip (Python package installer)
- virtualenv (to create Python virtual environments)
git clone https://github.com/lucasgearhead/Djanjo-React_Library-Project.git
cd Djanjo-React_Library-Project
cd back
python -m venv env
source env/bin/activate # On Windows, use `.\env\Scripts\activate`
pip install -r requirements.txt
Create a .env
file in the back
folder and add the following variables:
# Sensitive environment variables
SECRET_KEY=secret
DEBUG=True
ALLOWED_HOSTS=localhost
# Production-specific environment variables
MONGO_DB_HOST=localhost
MONGO_DB_PORT=27017
MONGO_DB_NAME=library_database
CORS_ALLOWED_ORIGINS=http://localhost:3000
python manage.py runserver
cd ../front
npm install
Create a .env
file in the front
folder and add the following variable:
REACT_APP_API_URL=http://localhost:8000/
npm start
- Frontend:
http://localhost:3000
- Backend:
http://localhost:8000
- Database: Make sure MongoDB is installed and running.
- Environments: Always activate the virtual environment before running backend commands.
- Environment Variables: Keep environment variables secure and do not expose them in public repositories.
- Backend: Django, MongoDB, PyJWT
- Frontend: React, React Router DOM, Axios
- Fork the project.
- Create a feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a Pull Request.