npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

trt-global-cms

v1.67.0

Published

A blank template to get started with Payload 3.0

Downloads

61

Readme

Readme Top

  • We recommend using pnpm for managing dependencies in this project.

About The Project

This project is developed to manage and publish content for TRT Global. We utilize PayloadCMS version 3 for content management and various modern technologies for efficient performance and scalability.

Built With

  • ![PayloadCMS] http://localhost:3000/admin

Project Structure

The project is organized in a modular structure to maintain scalability and readability. Below is a brief overview of the key directories and their purposes:

  • app/: Main application logic.
  • payload/: Payload CMS configuration and custom functionalities.
  • collections/: CMS collections and related logic.
  • docker-compose.yml: Docker setup for development and production environments.

Important Files

payload.config.ts

The main configuration file for PayloadCMS. This file contains the setup for collections, fields, access control, and other settings required for PayloadCMS to function correctly.

/src/app/(app)/layout.tsx

Handles the layout for the main application, including header, footer, and main content area.

/src/app/(payload)/layout.tsx

Manages the layout for the PayloadCMS admin interface.

/src/app/(app)/page.tsx and /src/app/(payload)/page.tsx

These files define the main pages for the application and the PayloadCMS admin interface, respectively.

Scripts Explanation

scripts in package.json

  1. build: Builds the project using Next.js.

    • Command: pnpm run build
    • Explanation: Uses the Next.js builder to compile the project for production.
  2. build:css: Builds CSS using TailwindCSS.

    • Command: pnpx tailwindcss build -i ./src/styles/tailwind.css -o ./src/app/styles.css
    • Explanation: Processes TailwindCSS and outputs the final CSS file.
  3. dev: Runs the project in development mode.

    • Command: pnpm run dev
    • Explanation: Starts the development server with hot-reloading.
  4. devsafe: Runs the project in development mode with a clean build.

    • Command: pnpm run devsafe
    • Explanation: Cleans the build directory before starting the development server.
  5. generate:types: Generates types for PayloadCMS.

    • Command: pnpm run generate:types
    • Explanation: Creates TypeScript types based on the PayloadCMS schema.
  6. lint: Lints the code using ESLint.

    • Command: pnpm run lint
    • Explanation: Checks the code for linting errors.
  7. lint:fix: Fixes linting errors.

    • Command: pnpm run lint:fix
    • Explanation: Automatically fixes linting errors where possible.
  8. format: Formats the code using Prettier.

    • Command: pnpm run format
    • Explanation: Formats the code according to the Prettier configuration.
  9. payload: Runs PayloadCMS.

    • Command: pnpm run payload
    • Explanation: Starts the PayloadCMS server.
  10. start: Starts the project.

    • Command: pnpm run start
    • Explanation: Starts the project in production mode.

Commit Guidelines

Commit messages should follow a consistent format to ensure readability and maintainability. Example:


git commit -m "TGMS-0 feat(typesense): add Typesense integration and create repositories
Added Typesense integration to important models like content.
Added various types based on DTO logic.
Created repositories for content, language, strategy, and translate models.
Tested the implementation and it works correctly."

How to Test

How to Install

  1. Clone the repository:
use ssh:
   git clone [email protected]:trt-digital/trt-global-cms.git
  1. Install dependencies using pnpm:
pnpm install

How to Start

  1. Run the project:
pnpm run dev OR docker-compose up

How to Build

  1. Build the project:
pnpm run build
  1. Start the project:
pnpm run start

How to Develop

  1. Create a new branch:
git checkout -b new-feature
  1. Make changes to the code.
  2. Test your changes:
pnpm run dev
  1. Commit your changes:
git commit -m "new-feature"
  1. Push your changes to the remote branch:
git push origin new-feature
  1. Create a pull request on GitHub.

How to Run with Docker

To run the project using Docker, follow these steps:

  1. Ensure Docker and Docker Compose are installed on your machine.
  2. Build and run the Docker containers:

docker-compose up --build

This will start all the services defined in the docker-compose.yml file, including MongoDB and the application itself. 3. For production environment, use the production Docker Compose file:

docker-compose up --build

DevOps

The project uses RabbitMQ and Prisma for database management, with MongoDB as the primary database. Environment variables are managed using YAML files. The development environment is set up using docker-compose.dev and the production environment using docker-compose.

Inside the configs directory, you will find an example configuration file named example.yaml. This file contains all the necessary environment variable configurations. Make sure to update this file according to your environment settings.

Contact