/BookStream

Bookstream features a clean and responsive interface, advanced search functionality, and secure payment processing. Perfect for developers looking to create or contribute to a dynamic, feature-rich bookstore application.

Primary LanguageTypeScriptMIT LicenseMIT

Bookstream πŸ“š

MIT License Next.js Express MongoDB Tailwind CSS Node.js Author [Open Issues]6 Closed Issues 16 Pull Requests 2 Forks 22 Stars 18 Languages 3

Bookstream is a dynamic, feature-rich bookstore application designed to provide a seamless user experience. With its clean, responsive interface, powerful search capabilities, and secure payment processing, Bookstream is ideal for developers building or contributing to an online bookstore.

Bookstream Logo

This project is now OFFICIALLY accepted for

GSSoC 2024 Extd
Hacktober fest 2024

Table of Contents

Features ✨

  • User Authentication: Secure login and registration using JWT.
  • Book Management: Comprehensive book management, including add, edit, and delete functionalities.
  • Advanced Search: Powerful search functionality to filter books by various criteria.
  • Secure Payment: Integrated secure payment processing for book purchases.
  • Responsive Design: Optimized for mobile, tablet, and desktop.

Tech Stack πŸ› οΈ

  • Frontend: Next.js, Tailwind CSS
  • Backend: Node.js, Express
  • Database: MongoDB
  • Authentication: JSON Web Tokens (JWT)

Installation πŸš€

  1. Clone the repository:

    git clone https://github.com/yashksaini-coder/BookStream.git
  2. Install dependencies:

    cd BookStream
    npm install
  3. Create Environment Variables:

    • Create a .env file (in backend workspace) by below command and add the following:
    cd /backend
    cp .env.example .env
    • and update your MongoDB URI and JWT secret key in this file.
      MONGODB_URI=your_mongo_db_uri
      JWT_SECRET=your_jwt_secret
      NEXT_PUBLIC_PAYMENT_API_KEY=your_payment_api_key
  4. Run the application:

    • back to parent directory
    cd ../
    npm run start
    • This will start the application in production mode.
    • you can also start backend and frontend by these commands:

    npm run start:backend npm run start:frontend

    
    Access the app at `http://localhost:3000`.
    
    

Important Note

If you encounter issues, refer to the Common Issues section for troubleshooting steps.

Common Issues ⚠️

Production Build Error

When starting the server with npm start, you may see:

Error: Could not find a production build in the '.next' directory.

Solution: Run npm run build before starting the server.

ESLint Errors

You might encounter errors related to unescaped characters in JSX:

Error: `'` can be escaped with `'`, `‘`, `'`, `’`.  react/no-unescaped-entities

Solution: Escape unescaped characters in your JSX or disable the ESLint rule in your configuration.

Usage Examples πŸ’‘

User Login

Navigate to the login page, enter your credentials, and upon successful login, you’ll be redirected to the homepage.

Adding a Book

In the book management section, fill out the form with book details (e.g., title, author, genre) to add a new book.

Getting Started 🏁

  1. Run the development server:
    npm run dev
    • This will start the application in production mode.
    • you can also start backend and frontend by these commands:
    npm run dev:backend npm run dev:frontend
    - 
    Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
    
    
  2. Edit and Update:
    • Modify app/page.tsx. The page auto-updates as you edit.

Future Enhancements / Roadmap πŸš€

The roadmap outlines the upcoming features and improvements planned for Bookstream:

  • Wishlist Integration: Allow users to create and manage a wishlist of books.
  • Ratings & Reviews: Enable users to rate and review books.
  • Admin Dashboard: Introduce an admin panel for better control over book management, users, and sales data.
  • Book Recommendations: Implement personalized book recommendations based on user preferences and purchase history.
  • Multilingual Support: Expand the platform to support multiple languages for a broader audience.

Learn More πŸ“š

To learn more about Next.js, check out these resources:

Deploy on Vercel ☁️

The easiest way to deploy your Next.js app is with Vercel.

Visit the Next.js deployment documentation for more details.

Contributing 🀝

We welcome contributions! Here’s how to contribute:

  1. Fork the repository.
  2. Create your feature branch:
    git checkout -b feature/YourFeature
  3. Commit your changes:
    git commit -m 'Add some feature'
  4. Push to the branch:
    git push origin feature/YourFeature
  5. Open a pull request.

Contributors List

Thanks to all contributors who have helped make this project better!

Contributors

License πŸ“„

This project is licensed under the MIT License. See the LICENSE file for details.

Happy coding! 😊