Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

App Skeleton using Next.js, Node/Express, React #78

Merged
merged 22 commits into from
Oct 21, 2019
Merged
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": ["next/babel"],
"plugins": [
[
"module-resolver",
{
"root": ["."],
"alias": {
"client": "./client",
"server": "./server"
}
}
]
]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
.next/
timmyichen marked this conversation as resolved.
Show resolved Hide resolved
27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier"],
"env": {
"node": true,
"es6": true
},
"rules": {
"prettier/prettier": ["error", { "singleQuote": true }],
"@typescript-eslint/explicit-function-return-type": 0,
"react/display-name": 0,
"@typescript-eslint/no-explicit-any": 0
},
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"parser": "@typescript-eslint/parser"
}
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ After several years of being dissatisfied with existing group event tools (Meetu

This will be a self-hosted Docker container that you can one-click deploy to the cloud, then configure through an admin panel. No coding required.

Your nonprofit can sub-domain it to your website like `chapter.sierraclub.org` or `chapter.womenwhocode.org`.
Your nonprofit can sub-domain it to your website like `chapter.sierraclub.org` or `chapter.womenwhocode.org`.

You can use your own authentication tools. And all your user data will stay on your own server.

@@ -40,6 +40,24 @@ We are considering using a tool like [Next.js](https://nextjs.org) to get up and

We will focus on building an open API first. Then developers can use the API to build their own mobile clients and voice interface clients.

## Development Setup

Requirements: Docker, internet access
timmyichen marked this conversation as resolved.
Show resolved Hide resolved

Install dependencies:

```
npm install
timmyichen marked this conversation as resolved.
Show resolved Hide resolved
```

Start the server:

```
docker-compose up
```

And that's it! Navigate to `localhost:8000` to view the app.

## Schema

![a diagram illustrating the proposed schema for chapter](https://user-images.githubusercontent.com/2755722/66802465-7d181900-eeea-11e9-9c6a-48012839d5f2.png)
@@ -94,9 +112,9 @@ Quincy Larson is the project lead. freeCodeCamp.org will start "dogfooding" this

Here's an out-dated example of an app with similar functionality: [The freeCodeCamp Study Group Directory](https://study-group-directory.freecodecamp.org).

You should [join our Discord server](https://discord.gg/vbRUYWS) to get connected with people interested in this project and to be aware of our future announcements.
You should [join our Discord server](https://discord.gg/vbRUYWS) to get connected with people interested in this project and to be aware of our future announcements.

## Contributing
## Contributing

### [Take part in discussions or Contribute code to this opensource codebase.](CONTRIBUTING.md)

3 changes: 3 additions & 0 deletions client/components/SomeComponent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as React from 'react';

export default () => <div>This is an imported component</div>;
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'
services:
app:
image: node:10-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the "end product" of this project is a Docker container, how about geting started on creating a Dockerfile for it - instead of defining configurations within Docker Compose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(copied from discord)

docker-compose will really shine when we add additional images, e.g. for postgres or redis or any other service we might need. i think dockerfiles are really only necessary if we're adding special config to a base image (at the moment the base node10 image should be sufficient for what we need)

but also, a dockerfile is probably a good idea for setup including npm install

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a dockerfile is probably a good idea for setup including npm install

Yes, in future we will add many dependencies which then require npm install. Can you please go ahead and create dockerfile and link to Docker Compose

command: 'npm run dev'
volumes:
- .:/usr/chapter/
working_dir: /usr/chapter/
ports:
- '8000:8000'
2 changes: 2 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
10 changes: 10 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
webpack(config, options) {
config.resolve.alias.client = './client';
config.resolve.alias.server = './server';
config.plugins.push(new ForkTsCheckerWebpackPlugin());
return config;
},
};
6 changes: 6 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ignore": [".git", "node_modules", ".next"],
"watch": ["server"],
"exec": "npm run dev",
"ext": "ts"
}
Loading