Code Monkey home page Code Monkey logo

alpha-site's Introduction

Alpha Site

Build Status link

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

Getting Started

You can run the development server directly or through docker-compose:

npm i
npm run dev
# or
docker-compose run dev

Open http://localhost:3000 with your browser to see the result.

Enabling Report a Problem

  1. First create a GC Notify Account
  2. Once you have your account created ask to be added to the Alpha Site account
  3. Set the following environment variables (definitions below ) REPORT_A_PROBLEM_ENABLED, NOTIFY_REPORT_A_PROBLEM_TEMPLATE_ID, NOTIFY_REPORT_A_PROBLEM_EMAIL, NOTIFY_API_KEY, NOTIFY_BASE_API_URL
  4. Start application as usual

Enabling User Signup

  1. First create a GC Notify Account
  2. Once you have your account created ask to be added to the Alpha Site account
  3. Run mongo container and mongo express using docker docker compose up mongodb mongo-express -d
  4. Set the following environment variables (definitions below) MONGO_URL, MONGO_DB, USER_SIGNUP_ENABLED, USER_SIGNUP_FRENCH_TEMPLATE_ID, USER_SIGNUP_ENGLISH_TEMPLATE_ID
  5. Start the application as usual

Environment Variables

Here is a list of all the environment variables used to configure the application along with what they do.

MONGO_URL: The URL for the MongoDB. If you are using the compose set up locally this is `mongodb://root:example@localhost:27017

MONGO_DB: The database or namespace to use ( will automatically be created if it doesn't exist )

REPORT_A_PROBLEM_ENABLED: Feature flag for the report a problem API to enable sending to GC Notify. Leave undefined if you do not want to enable this.

USER_SIGNUP_ENABLED: Feature flag for the user sign up API. Leave this undefined if you do not want to enable this. The route will automatically return a 200 in this case

USER_SIGNUP_FRENCH_TEMPLATE_ID: The French template to use for user sign up

USER_SIGNUP_ENGLISH_TEMPLATE_ID: The English template to use for the user sign up

NEXT_PUBLIC_NOTIFY_REPORT_A_PROBLEM_TEMPLATE_ID: The Notify template ID for the report a problem email template

NOTIFY_REPORT_A_PROBLEM_EMAIL: The email to send it too

NOTIFY_API_KEY: The Notify API key

NOTIFY_BASE_API_URL: The base url for the Notify api. This value should be https://api.notification.canada.ca

NEXT_PUBLIC_API_MOCKING: Value can be enabled or disabled. If enabled, a mock service worker will run in the Node environment to intercept handled network requests in NextJS data fetching methods like getStaticProps(). We use this to mock API responses during Cypress testing.

STRAPI_API_BACKEND_URL: Root URL for the Strapi CMS API. We use https://alphasite-api.dts-stn.com/ for our application.

NEXT_PUBLIC_ADOBE_ANALYTICS_URL: URL for adobe analytics. It is found in the documentation for Adobe Analytics installation.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

alpha-site's People

Contributors

ephraimassi avatar will0684 avatar moro-code avatar blai0264 avatar var-kyle avatar snyk-bot avatar nghe0001 avatar nibivi77 avatar ericdube avatar pcraig3 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.