uiwjs /
react-md-editor
A simple markdown editor with preview, implemented with React.js and TypeScript.
Loading repository data…
jaygould / repository
A simple implementation of a Next.js server side rendered web application written in Typescript with JWT authentication and a PostgreSQL database
I have written a blog post about this starter project and explained some of the key features and challenges faced while developing it, so check it out if you're interested.
V1 of this repo is still available in the V1 branch, but the project is now updated to use a cleaned and organized approach.
This project has two sections:
The Next app doesn't have an associated database, as all data is handled on the Node API. This is the preferred way to develop an application according to many (including a core maintainer or Next.js as mentioned in a Shop Talk Show episode).
Change the name of api/.env.sample file to api/.env, and client/.env.sample to client/.env. (The client .env file is only needed for production, as the local version uses the environment variables from docker-compose.yml).
Docker Compose can be used to run the boilerplate for development, allowing the automatic setup of dev environment and database structure. Ensure Docker is installed, and run Docker Compose from the top level directory of the repo:
Development: run docker-compose build --no-cache and then docker-compose up
Development (optional): run npm install on the host machine to install dependencies for Typescript definitions
Production: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Jest is installed on both front and back end of the project. The front end uses Enzyme alongside Jest to test the rendering of the React components, as well as using Jest to test some of the service functions. The back end uses Jest to unit test some of the main auth functions on the server. They have separate config files and tests as the environments differ slightly.
First, shell in to the Docker container with docker-compose exec api_dev sh, and then run the test command npm run test.
Test docs for client coming soon.
As the app is server side rendered using Next.js, we get the benefit of having routes protected against unauthorized users in a different way than a normal React application. In the case of a simple React app using Create React App, the whole app is sent down to the browser at the first request. On the other hand, Next provides automatic code splitting and can protect logged-in routes from being accessed by users with invalid JWT's.
The code for this is in client/src/services/Token.service and leverages the power of Next's getInitialProps() lifecycle method to verify the user's token whether they are on the client or the server side. This is possible because getInitialProps() is executed on the client and server side.
Selected from shared topics, language and repository description—not editorial ratings.
uiwjs /
A simple markdown editor with preview, implemented with React.js and TypeScript.
jwagner /
A fast simplex noise implementation in Javascript / Typescript.
yuvraj24 /
A simple and fully customizable React Native component that implements a status/stories feature similar to Whatsapp & Instagram ⭐✨🌟
apexcharts /
ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
nonocast /
A simple todolist system implemented with Spring's backend and TypeScript/React's frontend. Enjoy it.
thisisagile /
Straightforward library for building domain-driven microservice architectures, implementing a simple evolutionary architecture.