-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,93 @@ | ||
|
||
A site on java script, html, css. | ||
# Camps Review Site | ||
|
||
Working with the tools: | ||
Express Router and Cookies, Express Session and Flash, Security, mongoDB, Cloudinery, receiving and sending requests. | ||
## Overview | ||
|
||
A site to which you can connect if you have already registered before and if you cannot register. | ||
On the site you can receive reviews of camps around the world, and write reviews about them (only if you are registered and connected to the site). You can add a new camp (only if you are registered and logged in). | ||
The site is protected at a reasonable level against hacking (code transplants, etc.). | ||
The images are stored in cloudinery. | ||
Working with a database using MongoDB. | ||
This project is a full-stack web application that allows users to view and share reviews of camps around the world. Users can register, log in, and contribute to the site by adding new camps and reviews. The site is built with JavaScript, HTML, and CSS, and leverages several powerful tools and libraries, including Express, MongoDB, and Cloudinary. The application is designed with security in mind, offering protection against common vulnerabilities. | ||
|
||
## Features | ||
|
||
- **User Authentication:** Users can register and log in to access the site’s features. Only authenticated users can write reviews or add new camps. | ||
- **Camp Reviews:** Users can view reviews of various camps, and registered users can submit their own reviews. | ||
- **Add New Camps:** Registered users can add new camps to the site, including uploading images stored securely in Cloudinary. | ||
- **Security:** The site includes security measures such as protection against code injection and other common web vulnerabilities. | ||
- **Database Management:** MongoDB is used for storing user data, reviews, and camp information. | ||
- **Image Storage:** Images uploaded by users are stored securely using Cloudinary. | ||
|
||
## Technologies Used | ||
|
||
- **Frontend:** JavaScript, HTML, CSS | ||
- **Backend:** Node.js, Express.js | ||
- **Database:** MongoDB | ||
- **Image Storage:** Cloudinary | ||
- **Authentication and Security:** | ||
- **Express Router** | ||
- **Express Session** | ||
- **Flash Messages** | ||
- **Cookies** | ||
- **Input Validation and Sanitization** | ||
|
||
## Installation | ||
|
||
1. Clone the repository to your local machine: | ||
```bash | ||
git clone https://github.com/your-username/camps-review-site.git | ||
cd camps-review-site | ||
``` | ||
|
||
2. Install the necessary dependencies: | ||
```bash | ||
npm install | ||
``` | ||
|
||
3. Set up environment variables: | ||
- Create a `.env` file in the root of the project. | ||
- Add the following environment variables: | ||
```plaintext | ||
MONGODB_URI=<Your MongoDB connection string> | ||
CLOUDINARY_CLOUD_NAME=<Your Cloudinary cloud name> | ||
CLOUDINARY_API_KEY=<Your Cloudinary API key> | ||
CLOUDINARY_API_SECRET=<Your Cloudinary API secret> | ||
SESSION_SECRET=<Your session secret> | ||
``` | ||
4. Run the application: | ||
```bash | ||
npm start | ||
``` | ||
|
||
5. Open your browser and navigate to `http://localhost:3000`. | ||
|
||
## Usage | ||
|
||
- **Register/Login:** Create an account or log in with an existing account to access the full functionality of the site. | ||
- **Browse Reviews:** View reviews of various camps around the world. | ||
- **Submit Reviews:** After logging in, write your own reviews for the camps. | ||
- **Add Camps:** Share new camps by adding them to the site with descriptions and images. | ||
- **Security:** Rest assured that your data is protected with the implemented security measures. | ||
|
||
## Security Measures | ||
|
||
- **Express Session and Cookies:** Sessions are managed securely with Express Session and cookies. | ||
- **Input Validation:** All inputs are validated and sanitized to prevent code injections and other security risks. | ||
- **Flash Messages:** Inform users of their actions with flash messages, enhancing the user experience and security awareness. | ||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please submit a pull request with a detailed description of your changes. Ensure all new code is well-documented and tested. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. | ||
|
||
## Acknowledgments | ||
|
||
- **Express.js** - For the robust backend framework. | ||
- **MongoDB** - For the NoSQL database. | ||
- **Cloudinary** - For image storage and management. | ||
- **Node.js** - For the server environment. | ||
- **Security Best Practices** - Implementing secure coding practices to protect users. | ||
|
||
``` | ||
This `README.md` provides an overview of the project, details on installation, usage instructions, and information about the technologies and security measures used in the application. It also encourages contributions and provides license information. |