The CMS (Content Management System) application is a web-based tool for managing categories, products, and orders. It provides an interface for creating, editing, and deleting categories and products, as well as viewing and managing orders.
The CMS application is built using the following technologies:
To run the CMS application locally, follow these steps:
git clone <repository-url>
npm install
.env
file in the root directory of the project and configure the following environment variables:Database DB_HOST= DB_PORT= DB_NAME=
Authentication GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET=
Other API_SECRET=
<your-database-host>
, <your-database-port>
, <your-database-name>
, <your-google-client-id>
, <your-google-client-secret>
, and <your-api-secret>
with the appropriate values.npm run dev
To run the CMS application locally, use the following command:
npm run dev
This command starts the development server and the application will be accessible at http://localhost:3000
.
The CMS application is deployed and can be accessed at https://heritage-selective.vercel.app/.
The application can be deployed to a hosting platform like Vercel, Heroku, or AWS. Follow the platform-specific instructions to deploy your Next.js application.
Once deployed, the application will be accessible at the deployment URL provided by the hosting platform.
Contributions to the CMS application are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
The CMS application is open source and released under the MIT License. Please note that Next.js applications require a .env.local file for configuring environment variables. Make sure to replace , , , , , , , and with the actual values.
npm run dev
The CMS application provides an API for interacting with its data. The API is RESTful and follows standard HTTP methods for CRUD operations. Here are the available endpoints:
GET /api/categories
: Retrieves a list of all categories.GET /api/categories/:id
: Retrieves a specific category by ID.POST /api/categories
: Creates a new category.PUT /api/categories/:id
: Updates a category by ID.DELETE /api/categories/:id
: Deletes a category by ID.GET /api/products
: Retrieves a list of all products.GET /api/products/:id
: Retrieves a specific product by ID.POST /api/products
: Creates a new product.PUT /api/products/:id
: Updates a product by ID.DELETE /api/products/:id
: Deletes a product by ID.GET /api/orders
: Retrieves a list of all orders.GET /api/orders/:id
: Retrieves a specific order by ID.POST /api/orders
: Creates a new order.PUT /api/orders/:id
: Updates an order by ID.DELETE /api/orders/:id
: Deletes an order by ID.Note: To access the API endpoints that require authentication, you need to include the appropriate authentication token in the request headers.
Once the application is running, you can access it in your web browser at http://localhost:3000
. The homepage displays a welcome message and the user's name.
Contributions to the CMS application are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
The CMS application is open source and released under the MIT License. Make sure to replace , , , , , , and with the actual values.