Welcome to plan-it-social-web
! These are some quick notes on how to start contributing to our open source project. A good place to start is to join our Discord server.
The group meets most Mondays 6pm PST (meetup) Small Co-working sessions are held on Sunday 9am PST on Discord
To run your Remix app locally, make sure your project's local dependencies are installed and environment variables are set up:
npm install
mv .env.example .env
Then, you'll need to fill in the .env
file with the appropriate values.
Come to the Discord server or meetup for help with this step.
Afterwards, start the Remix development server like so:
npm run dev
Open up http://localhost:3000 and you should be ready to go!
If you're used to using the vercel dev
command provided by Vercel CLI instead, you can also use that, but it's not needed.
npm run storybook
then visit http://localhost:6006 to see all the components in action.
- If you're a contributor to the repo skip to
Step 2
- Join the group, check out the Discord server!
- Fork the repo
- Clone your fork
- Set your upstream to the project main branch to avoid merge conflicts
git remote add upstream https://github.com/social-plan-it/plan-it-social-web.git
- Create a branch
git checkout -b <name>
- Add your
.env
file (example here or ask the Discord for help on details) - Run
npm install
- Make your changes
- Add you changed files with
git add
andgit commit -m "<a stellar commit message>"
- Push your changes to your fork with
git push
- Create a pull request
- Iterate on the solution
- Get merged!
Use the following settings to format your files on save:
{
// These are all my auto-save configs
"editor.formatOnSave": true,
// turn it off for JS and JSX, we will do this via eslint
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": false
},
// tell the ESLint plugin to run on save
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
We've created some handy scripts to help with database management with Prisma. Occasionally you might need to use these to update the database on your local machine.
-
npm run build:db
- generate your prisma client when starting out or when updates are made to the Prisma schema -
npm run update:db
- prototype your schema to iterate on schema design locally -
npm run seed:db
- consistently create data by seeding data into our database. We have a slightly different setup than when is in the Prisma docs. We are using--require tsconfig-paths/register
to use the~
path feature in Remix (ref: Kent C. Dodds)
We use ESLint to enforce code style. You can run the linter using the following command:
npm run lint
for auto fix
npm run lint:fix
Also included in our documentation, are great instructions on how to setup this functionality to automatically run on save in VS code.
We use TypeScript to enforce static typing. You can run the type checker using the following command:
npm run typecheck
You can run the test suite using the following commands:
npm run test:e2e
Please ensure that the tests are passing when submitting a pull request. Or get help from the Discord community to get them passing.