Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
/ writzsol Public archive

A Platform to enable bloggers to just write content.

License

Notifications You must be signed in to change notification settings

Afulton11/writzsol

Repository files navigation

This is a Next.js project bootstrapped with create-next-app.

Getting Started

  1. After cloning the repo, install dependencies.

    npm run install
    # or
    yarn install
  2. Connect typeorm with a postgres database. For now, create a local postgresql instance and a .env in the root folder. This file will contain sensitive data required to interact with external APIs like Google Auth or Github Auth. Then, setup local databases with psql:

npm run db:setup
# or
yarn db:setup
  1. Inside the .env file add, TYPEORM_URL={Your-Database-Url-Here} for localhost, this url will look something like: postgres://admin:admin@localhost:5432/writzsol_dev

  2. Add additional TYPEORM env. variables to your .env file:

    APP_ENV="LOCALHOST"
    NEXT_PUBLIC_SITE_URL="http://localhost:3000"
    TYPEORM_ENTITIES="../../../lib/graphql/server/models/**/*.ts"
    TYPEORM_MIGRATIONS="../../../lib/graphql/server/migrations/**/*.ts"
    TYPEORM_SUBSCRIBERS="../../../lib/graphql/server/subscribers/**/*.ts"
    TYPEORM_ENTITIES_DIR="../../../lib/graphql/server/models"
    TYPEORM_MIGRATIONS_DIR="../../../lib/graphql/server/migrations"
    TYPEORM_SUBSCRIBERS_DIR="../../../lib/graphql/server/subscribers"
  3. Run typeorm migrate:

    yarn db:migrate:local && yarn db:migrate:local:test
  4. See more about what is needed for the '.env' file here: https://next-auth.js.org/getting-started/example. You may need to get a secret & client_id from both github and google. However, Github is the easiest clientId & secret to create.

OR

If you have access to our vercel deployments, simply run the vercel CLI command:

vercel env pull

and type in http://localhost:3000 as the NEXTAUTH_URL for development in the generated .env file.

  1. Run the development server:

    npm run dev
    # or
    yarn dev
  2. Open http://localhost:3000 with your browser to see the result.

Development Practices

Using tools like prettier, eslint, & husky will help keep clean looking code for every commit. However, we need some conventions for managing changes on GitHub.

Generally, titles in GitHub will be all lowercase using dashes - to represent spaces.

For Branches:
  • feat-*-{issue_id} denotes a feature branch where * is the feature's name
  • poc-*-{issue_id} denotes a Proof of Concept (POC) branch where * is the POC's name.
  • bug-*-{issue_id} denotes a branch used to fix a bug/issue; where * is the bug's title.
  • misc-*-{issue_id} denotes a miscellanous branch where * is a short description.

Once each branch's purpose has been fulfilled, a pull request to the main branch is created. This request is then reviewed and, eventually, marked as ready for merge. During merge, all commits will be squashed to represent the feature title. Finally, vercel will automatically run a new deployment.

For Issues:
  • feat-* identifies a feature, providing all necessary information for implementation.
  • bug-* identifies a bug within the application, providing any screenshots or context detailing the issue.
  • poc-* identifies a Proof of Concenpt (POC) that should be completed before implementing a feature.
  • Further conventions for Issues may developed as time goes on.

Learn More

Deployment on Vercel

We are using vercel to host our application during development. Check it out here: https://writzsol.vercel.app

About

A Platform to enable bloggers to just write content.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published