@@ -14,3 +14,63 @@ workflow that adapts to the conventions of all groups.
1414## Testing
1515
1616` pip install tox ` into your virtualenv, then ` tox ` .
17+ ## Local Development Setup
18+
19+ ### 1. Recommended Environment (Windows Users)
20+
21+ Running the backend directly on Windows may cause dependency and environment issues.
22+ It is highly recommended to use ** Windows Subsystem for Linux (WSL)** for a smoother setup experience.
23+
24+ #### Steps to install WSL:
25+
26+ 1 . Open PowerShell as Administrator and run:
27+
28+ ``` wsl --install
29+ ```
30+
31+
32+ 2 . Install Ubuntu from the Microsoft Store
33+
34+ 3 . Open the Ubuntu terminal and run the project inside WSL
35+
36+ Tested on: Windows (WSL - Ubuntu)
37+
38+ ### 2. OAuth Consumer Setup
39+
40+ To enable authentication, you must create an OAuth consumer on Meta-Wiki.
41+
42+ 1 . Go to: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration
43+
44+ 2 . Fill in the details:
45+ - ** Application Name:** Montage Local Dev(example)
46+ - ** Callback URL:** http://localhost:5000/callback
47+
48+ 3 . Select grants:
49+ - Basic identity
50+
51+ ** IMPORTANT:**
52+ Ensure the box ** "This consumer is for use only by [ YourUsername] " is UNCHECKED**
53+
54+ Otherwise, you will get:
55+ OAuthException: Consumer is owner-only (E010)
56+
57+
58+ ### 3. Example Configuration
59+
60+ Create or update your ` config.dev.yaml ` file:
61+
62+ ``` yaml
63+ oauth :
64+ consumer_key : " your_key_here"
65+ consumer_secret : " your_secret_here"
66+ callback_url : " http://localhost:5000/callback"
67+ ` ` `
68+
69+ ### 4. Troubleshooting Common Setup Issues
70+
71+ | Error / Issue | Root Cause | Solution |
72+ |--------------|-----------|----------|
73+ | OAuthException (E010) | Consumer is owner-only | Uncheck "owner-only" in Meta-Wiki |
74+ | Invalid Consumer | Incorrect key/secret | Verify credentials carefully |
75+ | Callback issues | URL mismatch | Ensure callback URL matches exactly |
76+ | Dependency errors | Running on Windows | Use WSL (Ubuntu) |
0 commit comments